Subject: Re: pkgsrc sickness
To: Dr. Rene Hexel <email@example.com>
From: Frederick Bruckman <firstname.lastname@example.org>
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-188.8.131.52:
> > Required by:
> > libvorbis-184.108.40.206
> > xmms-1.2.7nb1
> > Information for libogg-SO-220.127.116.11:
> > Required by:
> > vorbis-tools-18.104.22.168nb1
> > gqmpeg-0.16.0nb1
> That looks nice, I like that a lot. You might want to make
> libogg-SO-22.214.171.124 depend on libogg-126.96.36.199, though. Otherwise
> libogg-188.8.131.52 could be deinstalled, leaving around a bunch
> of packages that depend on the (now useless) old version of
> the library.
libogg-SO-184.108.40.206 doesn't depend on anything in libogg-220.127.116.11.
If you delete libogg-18.104.22.168, you'll leave a libogg-SO-22.214.171.124,
containing libogg.so.4.0 and libogg.so.4, to satisfy any dependencies.
There was a major bump between 126.96.36.199 and 188.8.131.52, 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 libpng.so.3.0, which has many
dependents, even though the dependent's binaries are really running
against libpng.so.3.1, since that's where libpng.so.3 points (assuming
they depend on libpng at all -- that's another story). That doesn't
seem to cause any trouble: the last libpng.so.3.* 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:
for p in `pkgorder -r -I png-SO`
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.)