Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Apr 1995 04:48:11 -0700
From:      "Jordan K. Hubbard" <jkh@freefall.cdrom.com>
To:        ports@freefall.cdrom.com
Subject:   I've made a major change to the way packages work.
Message-ID:  <20953.798551291@freefall.cdrom.com>

next in thread | raw e-mail | index | archive | help
This should be transparent to the user, but since represents a fairly
big shift away from previous methodology I though I'd share it with
y'all.

It works like this:

1. pkg_create now sorts its file list so that +* files are at the beginning.

2. pkg_add now uses tar's --fast-read op to extract the +CONTENTS file
   only from the package file.  The penalty for old packages will be a
   LONG pkg_add time (since the +* files are at the very *end* of old
   packages! :( ), but that's the breaks!  Not that it's hard to fix
   the old packages - a simple shell loop like this:

	for i in .. old packages .. ; do
		mkdir xxx
		cd xxx
		tar xzpf ../$i
		tar czf ../$i `find . | sed -e 's/^\.\///' -e '/^\.$/D' | sort`
		cd ..
		rm -rf xxx
	done

   Would "upgrade" them in place just fine, I think.

3. Now that pkg_add has the +CONTENTS file to play with, it can look
   for new @option directives, one of which is ``extract-in-place''.

   Thus if you have:

	x11bin.tgz with a packing list of:

	@name x11bin
	@option extract-in-place
	@cwd /usr/X11R6
	bin/xterm
	bin/xclock
	...

   You can make x11bin to straight into /usr/X11R6 without passing through
   /tmp.  This means we can finally go to the package format for all of
   FreeBSD's distribution files and for X11 - the formerly rather evil
   requirement that you have a 100MB /tmp for this is now gone!

I anticipate coming up with other interesting @option directives over
time, though hopefully not so many that it becomes utterly confusing.
You folks be the judge! :-)


I've also made pkg_add able to look along a PKG_PATH when extracting
packages that your package depends on.  pkg_manage sets this by
default to ``/usr/ports/packages:/usr/ports/packages/all:.'' (for
maximum compatability with old and new archives).

						Jordan



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