[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: md5sum



Bill Hogan writes ("Re: md5sum") [SuperCite undone]:
> [Ian Jackson <ian@chiark.chu.cam.ac.uk> writes:]
> > Bill Hogan writes ("md5sum"):
> > > What is the correct way to invoke md5sum to apply the checksums
> > > that are printed in Packages.gz?
> > Did you try
> 	md5sum <filename>
> > ?
> 
>     Yes indeed.
>     For example, I just downloaded the Debian-0.93 binutils package.
>     
> 	# md5sum binutils-2.5.2-3.deb
> 	089acd78637918ecec283fc42b55dfd9  binutils-2.5.2-3.deb
> 
>     I am interpreting this output to mean "the checksum computed by
> the program `md5sum' on the file `binutils-2.5.2-3.deb' was
> `089acd78637918ecec283fc42b55dfd9'."

Yes ...

>     But compared to what?

Huh ?

>     What is the md5sum checksum for that file supposed to be?
> 
>     The only thing I have to compare it to is the md5sum checksum for
> that package which I find printed in my Packages.gz file.

Yes ...

>      Assuming equivalent `md5sum' programs were used to compute both
> of these checksums, it seems to me that if the two checksums don't
> match -- whether because the files on which they were calculated differ
> or because the checksum printed in Packages.gz file is outdated or
> incorrect or for some other reason -- then I am well-advised to assume
> the file is screwed up.

Yes ...

>      Hence my question: What is the correct -- i.e., best, proper,
> least error-prone -- way to invoke md5sum to *APPLY* the checksums
> that are printed in Packages.gz?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can't "apply" a checksum.  I have no idea what you're talking
about, I'm afraid.

You compare the output from `md5sum filename' or `md5sum <filename'
with the md5sum field in the Packages file, and if it doesn't match
you don't have the same file as was used to create the Packages file.

>      Am I mistaken in thinking that a difference between the two
> checksums means that either the files on which they were calculated
> differ or the checksum printed in Packages.gz file is outdated or
> incorrect?

No, you are not mistaken in thinking that.

If all you're doing is reporting a checksum discrepancy it would save
a lot of to-ing and fro-ing if you said so, I think :-).

Ian.


Reply to: