Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 1996 03:58:32 -0700 (PDT)
From:      asami@cs.berkeley.edu (Satoshi Asami)
To:        roberto@keltia.freenix.fr
Cc:        ports@FreeBSD.ORG
Subject:   Re: MD5 checksum
Message-ID:  <199608191058.DAA15635@baloon.mimi.com>
In-Reply-To: <199608182055.WAA07521@keltia.freenix.fr> (roberto@keltia.freenix.fr)

next in thread | previous in thread | raw e-mail | index | archive | help
 * Something that has been bothering me for a while: why always verify the
 * checksum again and again after extraction ??
 * 
 * Any action will begin by verifying the checksum. I don't think it is
 * necessary... 

That is a bug/feature of bsd.port.mk.  I attempted to fix it before,
but gave up. ;)

The necessity is to guard against stale work/ directories.  If you
forget to delete the work/ subdirectory and attempt a
build/install/whatever after you update the ports support files
(Makefile etc.), this check may catch it.

Yes, I know it can be annoying, but the ports' targets are all chained 
together so there isn't much reason to do the steps independently.  I
usually just do "make package clean" (if I'm building packages) or
"make install clean" (if I'm doing this at home) and the check will
occur exactly once.

Granted, this is not the safest seatbelt either, as the upgrade may
not change the checksum (like, only patches/patch-ac was modified).
The solution to this is to keep a larger list of checksums in
files/md5 (like Makefile, patches/patch-*, scripts/*), create a
"checksum of currently used parts" somewhere in work/ and compare it
with files/md5 whenever a step is re-run.  (This is what I attempted
to do before --- the largest holdup was that the usual "checksum"
stage had to be run before extract, when the work/ directory didn't
even exist....)

Of course, this may just be a gross overkill and the solution may be
to simply move the checksum to within the extract target and don't
worry about any of the above. ;)

Satoshi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608191058.DAA15635>