bin/109334: pkg_add using chroot exits with error if wrong directory

Nick Hibma nick at anywi.com
Mon Feb 19 20:30:05 UTC 2007


>Number:         109334
>Category:       bin
>Synopsis:       pkg_add using chroot exits with error if wrong directory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 19 20:30:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Nick Hibma
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
AnyWi Technologies
>Environment:
System: FreeBSD hind.van-laarhoven.org 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #5: Wed Jan 17 18:49:39 CET 2007 root@:/usr/src/sys/i386/compile/HIND i386

>Description:

	PKG_DBDIR=/pkgdb
	PKG_PATH=/packages
	export PKG_DBDIR
	export PKG_PATH
	mkdir /tmp/somedir
	cd /tmp/somedir
	pkg_add -C /usr/obj/nanobsd/_.w /packages/perl.tbz

produces an error on exit as the directory /tmp/somedir does not exist in the
chroot-ed environment.

Fix is to add a 'cd /tmp' just before the package add, but this might not be an option in cases where the package is referenced relative.

>How-To-Repeat:

	See above.

>Fix:

Most probably the chdir should be moved to the part of the code that is outside the chroot.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list