Subject: Debugging pkg_comp
To: None <>
From: Christopher W. Richardson <>
List: tech-pkg
Date: 04/05/2005 11:07:06
Hash: SHA1


First, my thanks to Greg Troxel for some initial assistance in
getting pkg_comp up and working for me.  And now, it's up and
working basically fine.  However, I have one little nit that I
trying to track down ... I don't actually think it's causing any
problems per se, but it's definitely wrong, so I'm worried that
it will cause problems in the future.

If I do a pkg_comp makeroot, I get the following:

Setting up initial configuration...
PKG_COMP ==> Mounting sandboxed filesystems
PKG_COMP ==> Installing new `pkg-vulnerabilities' file
PKG_COMP ==> Checking if pkg_install is up to date
PKG_COMP ==> pkg_install is out of date; rebuilding
checking sys/mount.h usability... no
checking sys/mount.h presence... yes
configure: WARNING: sys/mount.h: present but cannot be compiled
configure: WARNING: sys/mount.h:     check for missing prerequisite headers?
configure: WARNING: sys/mount.h: see the Autoconf documentation
configure: WARNING: sys/mount.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/mount.h: proceeding with the preprocessor's result
configure: WARNING: sys/mount.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------- ##
configure: WARNING:     ## Report this to ##
configure: WARNING:     ## ------------------------------- ##
checking for sys/mount.h... yes
=> Unwrapping files-to-be-installed.
===> Checking for vulnerabilities in pkg_install-20050318
===> Installing for pkg_install-20050318
pkg_admin: Cannot chdir to /var/db/pkg: No such file or directory
/usr/bin/install -c -o root -g wheel -m 755 -d /usr/sbin
Stored 0 files from 0 packages in /var/db/pkg/pkgdb.byfile.db.
===> Registering installation for pkg_install-20050318
===> Cleaning for pkg_install-20050318
PKG_COMP ==> Building and installing pkgtools/digest
install -c -o root -g wheel -m 444 digest.1
===> Registering installation for digest-20050323
===> Packaging digest-20050323
===> Building binary package for digest-20050323
Creating package /pkg_comp/packages/All/digest-20050323.tgz
Using SrcDir value of /usr/pkg
Registering depends:.
===> Cleaning for digest-20050323

(I have not, as the message indicates I should have, sent this to
grant, as I suspect that that's not really a problem, but is a
result of whatever my real problem is ... if that persists after
fixing the other issue, I'll pass it along to him).

As you can see, there's some problem with putting entries in
/var/db/pkg/pkgdb.byfile.db, but that only seems to be the case
for pkg_install; afterwards, it goes happily along, builds other
packages, and puts them in /usr/pkgsrc/packages/All, just as
expected.  There is not, however, a pkg_install package there.

In fact, there appears not to be a registered pkg_install

cwr@achilles#which pkg_install
no pkg_install in /usr/pkg/bin /home/cwr/oshome/netbsd-i386/bin
/home/cwr/bin /home/cwr/working/achilles/working
/home/cwr/working/scripts /home/cwr/bin/rvplayer5.0
/home/cwr/working/gated_tools/scripts /home/cwr /home/cwr/bin
/home/cwr/scripts /home/cwr/working/achilles/working /usr/pkg/bin
/usr/X11R6/bin /usr/local/bin /usr/bin /bin . /usr/sbin /sbin
/usr/pkg/bin /usr/pkg/sbin /usr/vice/bin /usr/local/X11R6/bin
/usr/local/X11R6contrib/bin /usr/local/afs/bin
/home/cwr/oshome/netbsd-i386/bin /home/cwr/oshome/netbsd-i386/man
/home/cwr/oshome/netbsd-i386/lib /usr/local/afs/bin /usr/sbin
pkg_comp:default.conf# which pkg_install
no pkg_install in /home/cwr/bin/rvplayer5.0
/home/cwr/working/gated_tools/scripts /home/cwr /home/cwr/bin
/home/cwr/scripts /home/cwr/working/achilles/working /usr/pkg/bin
/usr/X11R6/bin /usr/local/bin /usr/bin /bin . /usr/sbin /sbin
/usr/pkg/bin /usr/pkg/sbin /usr/vice/bin /usr/local/X11R6/bin
/usr/local/X11R6contrib/bin /usr/local/afs/bin
/home/cwr/oshome/netbsd-i386/bin /home/cwr/oshome/netbsd-i386/man

But if I enter the chroot and try to make package in
pkgtools/pkginstall, I get:

==> Installing for pkg_install-20050318
===> pkg_install-20050318 is already installed - perhaps an older version?
*** If so, you may use either of:
***  - "pkg_delete pkg_install-20050318" and "/usr/bin/make reinstall" to upgrade properly
***  - "/usr/bin/make update" to rebuild the package and all of its dependencies
***  - "/usr/bin/make replace" to replace only the package without re-linking
***    dependencies, risking various problems.
*** Error code 1

If anyone has any suggestions on how to properly diagnose what's
going on here, I'd be much appreciative.  If useful, I can
provide my pkg_comp conf file or the full (or relevant portions)
of the output from makeroot.  This is on 2.0.2 i386.

Version: GnuPG v1.4.1 (NetBSD)
Comment: Processed by Mailcrypt 3.5.8 <>