bin/109334: pkg_add using chroot exits with error if wrong
directory
Nick Hibma
nick at anywi.com
Tue Feb 20 15:40:16 UTC 2007
The following reply was made to PR bin/109334; it has been noted by GNATS.
From: Nick Hibma <nick at anywi.com>
To: Remko Lodder <remko at elvandar.org>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: bin/109334: pkg_add using chroot exits with error if wrong
directory
Date: Tue, 20 Feb 2007 16:34:17 +0100 (CET)
Remko,
nick at hind:/usr/obj/nanobsd.koole.ship-2.4 % cd /tmp/
nick at hind:/tmp % mkdir somedir
nick at hind:/tmp % cd somedir/
nick at hind:/tmp/somedir % export PKG_DBDIR=/pkgdb
nick at hind:/tmp/somedir % export PKG_PATH=/packages
nick at hind:/tmp/somedir % sudo pkg_add -C /usr/obj/nanobsd.koole.ship-2.4/_.w /packages/mpd-3.18_5.tbz
pkg_add: leave_playpen: can't chdir back to '/tmp/somedir'
nick at hind:/tmp/somedir % echo $?
2
nick at hind:/tmp/somedir % ls -l
/usr/obj/nanobsd.koole.ship-2.4/_.w/usr/local/sbin/mpd -r-xr-xr-x 1 root wheel 220084 Jan 19 02:35 /usr/obj/nanobsd.koole.ship-2.4/_.w/usr/local/sbin/mpd
The error happens at the very end. The package gets installed correctly
but the error code is still set.
Nick
> Hello,
>
> Can you paste me the error message you get? Since it appears to me that
> the chroot option should just change the entire root to
> $whatever_was_defined at that moment instead of the pwd at the time of
> issueing the command :)
>
> Thanks&Cheers,
> remko
>
More information about the freebsd-bugs
mailing list