Subject: Re: Mosaic dependency, and a larger picture...
To: Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>
From: David Brownlee <abs@anim.dreamworks.com>
List: tech-pkg
Date: 04/13/1999 09:25:28
On Tue, 13 Apr 1999, Hubert Feyrer wrote:

> > 	I've also added a 'check distfiles' option so you can work out
> > 	what outdated distfiles your machine has :)
> 
> What do these two do? 
> At least the further sounds like it may better be merged into pkglint - no
> much point in running yet another checking-utility besides pkglint (for me
> :)...
> 
	I can go along with that.

> > 	I'd prefer to just have a tool which people can use after
> > 	upgrading a package.
> 
> For doing what, exactly?
> 
	For checking the version in every DEPENDS line against the
	version in each appropriate PKGNAME or DISTFILE, as appropriate.

> Other notes: 
>  - 0 comments, makes reading this a bit less fun :)

	I said it had been written quickly :)

>  - s/Scanning pkgsrc md5/Scanning pkgsrc-distfile md5/ to avoid confusion
>    about what this actually does. 

	The 'scanning' phase just checks all the files/md5 files, its
	later that it the cross references that against the distfiles.

>  - By what I understand, scan_packages() only checks if the pkg directory
>    after the ":" in the DEPENDS value exists, but doesn't do a check of
>    the version, which would have been needed to detect the recent Mosaic
>    issue. IIRC, checking of the pkg-dir is already done by pkg_lint...

	Believe me, it checks the version - there is some... interesting
	code that parses the variable subsittutions in the makefile.

>  - I thought I mailed out another approach to distfile-cleanout last week, 
>    but it seems this didn't get through (...). The basic idea there is:
> 
>     * cd /usr/pkgsrc
>     * mkdir distfiles/.OLD
>     * mv distfiles/* distfiles/.OLD	# Move all the files aside
>     * make distfile-cleanout		# Move the _neede_ ones back
>     * rm -fr distfiles/.OLD
>   
>    Where the distfile-cleanout target in every package does (pseudo-code): 
>   
>     for $f in ${DISTFILES} ${PATCHFILES} {
>         mkdir .../distfiles/${DIST_SUBDIR} if not there
>         mv .../distfiles/.OLD/$f .../distfiles/$f
> 
>    This is probably a bit slower with all the recursive make(1) calling,
>    but I was able to free several hundred MB of diskspace on my two
>    distfile repositories both at home and here.
> 
>    If there's interrest in that code, let me know. :)

	Its probably significantly slower on less than CPU rich hosts -
	I'd guess up to an order of magnitude (I've been doing some work
	on a sparc2, and I don't want to think about a vax :)

	Plus its more work for the user - pkg_check (or the extra
	functionality in pkglint if it gets merged), can spit out a list
	of all unused distfiles, and also all distfiles who's md5 cksum
	does not match (another useful option :)

		David/absolute

	"You think you're God's gift to the opposite sex"
	"Maybe... if you believe in a malevolent God."