misc/157543: pkg_add fails to install with -C from bad path
David Naylor
naylor.b.david at gmail.com
Thu Jun 2 20:30:14 UTC 2011
>Number: 157543
>Category: misc
>Synopsis: pkg_add fails to install with -C from bad path
>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: Thu Jun 02 20:30:13 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: David Naylor
>Release: 9.0-CURRENT
>Organization:
Private
>Environment:
FreeBSD dragon.dg 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sat May 21 22:12:29 SAST 2011
>Description:
pkg_add appears to chdir back to its calling directory after installed the package. When installing into a chroot that directory may not exist in the chroot and pkg_add fails.
>How-To-Repeat:
# mkdir /does/not/exist/in/scratchpad
# cd /does/not/exist/in/scratchpad
# pkg_add -C /scratchpad/pkg_env /usr/ports/packages/All/perl-threaded-5.12.3.txz
Removing stale symlinks from /usr/bin...
Removing /usr/bin/perl
Removing /usr/bin/perl5
Done.
Creating various symlinks in /usr/bin...
Symlinking /usr/local/bin/perl5.12.3 to /usr/bin/perl
Symlinking /usr/local/bin/perl5.12.3 to /usr/bin/perl5
Done.
Cleaning up /etc/make.conf... Done.
Spamming /etc/make.conf... Done.
pkg_add: leave_playpen: can't chdir back to ''
# echo $?
2
>Fix:
Use `chroot /scratchpad/pkg_env pkg_add ...` or start pkg_add from a directory that exists in the chroot environment.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list