Subject: Re: handling machine-dependent files in syspkg
To: None <,>
From: David Young <>
List: current-users
Date: 05/19/2003 01:14:26
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, May 18, 2003 at 09:47:01PM -0700, Jeff Rizzo wrote:
> So, I just started playing around with syspkg the other day, and
> it's got a lot of potential, but looks like it's suffered a little
> bitrot since its initial commit over a year ago.  I noticed that
> a few packages are referred to in the setlists that don't have
> corresponding packages in the distrib/syspkg/sets directory.


I was bit by the missing directories bug, too. I use the attached script
to detect, report, and create (with Makefile, and empty DESCR & COMMENT
files) missing directories.

If you are interested in whacking syspkg bugs, I have some pet ones:

    Add and delete a syspkg, and then verify that all the files were
    actually deleted. I recall being disappointed.  I think because the
    packing lists are written with the @dirrm and files out of order.

    There seems to be an excess of leading /// in the packing lists.
    It makes a difference, because the /// are compared textually some
    places, not path-component by -component.

    The granularity of the lists is great big. I especially remember
    some gigantic, non-essential files in /usr/share/ being grouped with
    termcap files. There is not any notion of syspkg dependencies that
    I can detect.


David Young             OJC Technologies      Urbana, IL * (217) 278-3933

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=touchup

# Give additional args for listpkgs (-a et cetera) on the command line.

# For each system set, find out the name of each of its packages
# and make sure that there exists a directory sets/$setname/$pkgname
# for each package.  For each missing package, write its name to the
# standard output, create empty sets/$setname/$pkgname/DESCR and
# sets/$setname/$pkgname/COMMENT files, and create a suitable
# sets/$setname/$pkgname/Makefile.
find ./sets -type d -mindepth 1 -maxdepth 1 | grep -v 'CVS' | \
    xargs -n 1 basename | \
while read setname ; do
	../sets/listpkgs $* -s ../sets $setname | \
	while read pkgname ; do
		[ -d sets/$setname/$pkgname ] && continue
		echo $pkgname
		mkdir $missing
		touch $missing/DESCR $missing/COMMENT
		cat > $missing/Makefile <<EOF

.include "../../../mk/"