Subject: Re: Designing compat linux32 packages
To: pkgsrc devel <>
From: Nicolas Joly <>
List: tech-pkg
Date: 03/31/2007 02:19:25
On Fri, Mar 30, 2007 at 05:35:10PM +0200, Joerg Sonnenberger wrote:
> On Fri, Mar 30, 2007 at 05:28:04PM +0200, Nicolas Joly wrote:
> > AFAIK, PKG_OPTIONS is currently used to add/remove features to a
> > single package. But with the PR, it's used to generate 2 different
> > packages that can be installed together on a machine ... In that
> > specific case, how can we know that we need to perform actions
> > multiple times (for updating by example), one per value.
> Nothing in the infrastructure prevents you have changing the package
> name based on BUILD_DEFS (or options). A good example for this is the
> handling of Python packages. There might be some confusion when
> intermediate cleaning is not done, but that would be a bug in its own. I
> don't think pkg_chk and related tools have issues with
> multiple-packages-from-one-location, otherwise they already fail to
> handle the Python case correctly. I know that this applies to the
> current bulk build code.

It does not seems to work as expected, at least for this case.

I applied the patch from PR, installed both packages (with and
without PKG_OPTIONS.suse=32bits), bumped emulators/suse100_base
revision number, and finally called `pkg_chk -u' ...

njoly@cixy [~]> pkg_info | grep suse
suse_base-10.0nb3   Linux  compatibility package
suse_32b_base-10.0nb3 Linux 32 bits compatibility package

njoly@cixy [~]> sudo pkg_chk -u
emulators/suse100_base - suse_base-10.0nb3 < suse_base-10.0nb4
emulators/suse100_base - suse_base-10.0nb3 < suse_base-10.0nb4
02:55 /usr/sbin/pkg_delete -K /var/db/pkg -r suse_base-10.0nb3
original MD5 checksum failed, not deleting: /usr/pkg/sbin/linux-mkpwd
Executing `/bin/rm -f /usr/pkg/emul/linux/etc/'
Executing `cd /usr/pkg/emul/linux/etc && /bin/rm -f group gshadow passwd shadow'
Executing `/bin/rm -f /usr/pkg/emul/linux/dev/*'
pkg_delete: unable to completely remove directory '/usr/pkg/emul/linux'
Executing `/bin/rmdir /usr/pkg/emul/linux/etc 2>/dev/null || true'
pkg_delete: couldn't entirely delete package `suse_base-10.0nb3'
(perhaps the packing list is incorrectly specified?)
[ Rechecking packages after deletions ]
emulators/suse100_base - suse_base-10.0nb4 missing
emulators/suse100_base - suse_base-10.0nb4 missing
[ Install ]
02:56 cd /local/src/NetBSD/pkgsrc/emulators/suse100_base && /usr/bin/make update
===> Cleaning for suse_base-10.0nb4
suse_base-10.0nb4 installed in previous stage
02:58 rm -f /local/src/NetBSD/pkgsrc/
Installed: suse_base-10.0nb4 suse_base-10.0nb4

njoly@cixy [~]> pkg_info | grep suse
suse_base-10.0nb4   Linux  compatibility package
suse_32b_base-10.0nb3 Linux 32 bits compatibility package

Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.