Subject: Re: pkgsrc sickness
To: Dr. Rene Hexel <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 08/21/2002 23:52:36
On Thu, 22 Aug 2002, Dr. Rene Hexel wrote:

> On Thursday, August 22, 2002, at 09:33  AM, Frederick Bruckman wrote:
> > 	# pkg_info -R 'libogg*'
> > 	Information for libogg-
> >
> > 	Required by:
> > 	libvorbis-
> > 	xmms-1.2.7nb1
> >
> >
> > 	Information for libogg-SO-
> >
> > 	Required by:
> > 	vorbis-tools-
> > 	gqmpeg-0.16.0nb1
>    That looks nice, I like that a lot.  You might want to make
> libogg-SO- depend on libogg-, though.  Otherwise
> libogg- could be deinstalled, leaving around a bunch
> of packages that depend on the (now useless) old version of
> the library.

libogg-SO- doesn't depend on anything in libogg-
If you delete libogg-, you'll leave a libogg-SO-,
containing and, to satisfy any dependencies.
There was a major bump between and, so packages really
will depend on one or the other, so that makes perfect sense.

The non-intuitive part, is when you update minor only. I now have a
png-SO-1.2.1, containing only, which has many
dependents, even though the dependent's binaries are really running
against, since that's where points (assuming
they depend on libpng at all -- that's another story). That doesn't
seem to cause any trouble: the last* to be installed
always has the major symlink pointing to it, and anything that needs
that, will depend on one png or another. In other words, the SO thing
is a trick, to satisfy the package tools -- there's really "only one"
png package installed at any given time (with extras), and you can
list all of its dependents with "pkg_info -q -R png\*".

>    This also would have the advantage that a 'make update' for
> libogg should work as expected and cleanly update everything
> that depends on both the old and the new version of the library.

"make update" becomes "make install", for most purposes. The hack
adds any SO packages in the dependencies to the list of packages to be
built, so you can't go wrong there.

If you really want to upgrade *all* the dependents cleanly, you only
need a tool to put them in order. E.g:

	cd /var/tmp
	for p in `pkgorder -r -I png-SO`
		pushd $p
	while [ "$PWD" != /var/tmp ]
		(make package && make clean) && popd || break

and now, if a build chokes, you're left in the directory of the
package that failed, all dependents remaining fully functional.
There's a draft manpage for "pkgorder" in the "pkg_hack" tarball.
(It should probably have examples like the one above.)