From owner-freebsd-ports Tue Aug 22 05:38:21 1995 Return-Path: ports-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id FAA23169 for ports-outgoing; Tue, 22 Aug 1995 05:38:21 -0700 Received: from silvia.HIP.Berkeley.EDU (silvia.HIP.Berkeley.EDU [136.152.64.181]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id FAA23160 for ; Tue, 22 Aug 1995 05:38:14 -0700 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.6.11/8.6.9) id FAA03651; Tue, 22 Aug 1995 05:38:05 -0700 Date: Tue, 22 Aug 1995 05:38:05 -0700 Message-Id: <199508221238.FAA03651@silvia.HIP.Berkeley.EDU> To: rgrimes@gndrsh.aac.dev.com CC: gary@palmer.demon.co.uk, ports@freebsd.org In-reply-to: <199508220644.XAA06375@gndrsh.aac.dev.com> (rgrimes@gndrsh.aac.dev.com) Subject: Re: bsd.ports.mk checksum From: asami@cs.berkeley.edu (Satoshi Asami) Sender: ports-owner@freebsd.org Precedence: bulk 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