Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Aug 1995 05:38:05 -0700
From:      asami@cs.berkeley.edu (Satoshi Asami)
To:        rgrimes@gndrsh.aac.dev.com
Cc:        gary@palmer.demon.co.uk, ports@freebsd.org
Subject:   Re: bsd.ports.mk checksum
Message-ID:  <199508221238.FAA03651@silvia.HIP.Berkeley.EDU>
In-Reply-To: <199508220644.XAA06375@gndrsh.aac.dev.com> (rgrimes@gndrsh.aac.dev.com)

next in thread | previous in thread | raw e-mail | index | archive | help
Hey guys, thanks...glad we are heading to a constructive discussion
again.

 * If it can't handle this, then the Makefile and/or .mk file is missing
 * a dependency that would quickly fix the problem:
 * .extract_done: Makefile
 * 
 * Makefiles are almost always modified for any new version of the port
 * due to source distribution changing.

Well that's true if the Makefile has changed due to local editing.
But let's not forget that the way that these things are usually
updated (cvs or sup -- I don't know how ctm handles timestamps), the
extract cookie having a newer timestamp than the Makefile doesn't
really guarantee anything, although it will probably catch many cases.

What we need is a framework to uniquely identify the distfile and the
extracted tree.  Even checksumming is not perfect, if both the new md5 
file and the new distfile arrived via sup, bsd.port.mk will happily
use the old extracted source.

Maybe what we can do is to record the distfile checksum in the
${WRKDIR} area, and compare that to the md5 after the first time.
This will save time, and I think it will also catch all but the most
weird cases (like a new patch added to change the name of a file and
PLIST updated to reflect the fact, but the user, having already done a
build before those updates, installing the stuff with the old name and
PLIST bombing on her face when trying to do a pkg_delete).

Heck, we can even store the checksum of ALL the relevant files
(Makefile, patches, package files etc.), that would be impossible to
break (I'm only semi-serious here, mind you).

 * It is missing a few dependencios for all the .magic cookies.  .
 * magic cookies with missing dependecies are a pain.  I really hate
 * it when I say ``make install'' and it don't do squat, I do a lot of
 * NFS mounting, this .install_done cookie thing has no idea if this
 * system has had the install run on it :-(.

There is a "reinstall" target to do exactly this, Rod.... :)

Also, the preferred way to move stuff from one system to another is to
use packages...and you don't even need the extracted source for this,
the "package-noinstall" is a separate package rule that doesn't depend
on install, so you can run it on a bare ports dir.

 * Here is mine for the .extract_done not causing an extract if the
 * Makefile has changed because this is a new version of the port:

I'll hold on to this to a while, let's see if we can handle this with
the "recorded checksum" idea above, 'cause it won't be necessary to
check the Makefile then.

Satoshi



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