pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/26951: mksandbox does not make LOCALPATCHES directory.



>Number:         26951
>Category:       pkg
>Synopsis:       mksandbox does not make LOCALPATCHES directory.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 15 05:05:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Masanori Mikawa
>Release:        NetBSD-2.0G
>Organization:
>Environment:
NetBSD raven 2.0G NetBSD 2.0G (RAVEN) #3: Tue Aug 24 01:54:00 JST 2004  
root@raven:/a/usr.obj/sys/arch/i386/compile/RAVEN i386
>Description:
mksandbox outputs value of the LOCALPATCHES to sandbox script for mounting
the directory. But the script did not make and mount that directory in
the sandbox. (Although it will be mounted when `sandbox mount' is performed
supposing LOCALPATCHES directory exists in other directories made by
mksandbox in the sandbox, it is not mounted if it does not exist.)
>How-To-Repeat:
# setenv LOCALPATCHES /tmp/localpatches
# mkdir -p $LOCALPATCHES
# cd /usr/pkgsrc/pkgtools/pkglint
# make show-var VARNAME=LOCALPATCHES
/tmp/localpatches
# ./mksandbox /tmp/sandbox
Copying the kernel
[snip]
Mounting /usr/pkgsrc/packages and /usr/pkgsrc/distfiles from /tmp/sandbox
Sandbox creation is now complete
# cd /tmp/sandbox
# ./sandbox umount
umount: /tmp/sandbox/tmp/localpatches: not currently mounted
# ./sandbox mount
mount_null: /tmp/localpatches on /tmp/sandbox/tmp/localpatches: No such file or 
directory
>Fix:
--- pkgsrc/mk/bulk/mksandbox.orig       2004-09-15 11:49:24.000000000 +0900
+++ pkgsrc/mk/bulk/mksandbox
@@ -277,7 +277,12 @@ $mountprog $mountflags $packages $sandbo
 $mountprog $mountflags $distfiles $sandbox/$distfiles
 echo "$packages $packages rw \\" >> $sandbox_script
 echo "$distfiles $distfiles rw \\" >> $sandbox_script
-test -n "$localpatches" && echo "$localpatches $localpatches rw \\" >> 
$sandbox_script
+if [ -n "$localpatches" ]; then
+       echo "Mounting $localpatches from $sandbox"
+       $mkdirprog $sandbox/$localpatches
+       $mountprog $mountflags $localpatches $sandbox/$localpatches
+       echo "$localpatches $localpatches rw \\" >> $sandbox_script
+fi
 
 cat >> $sandbox_script <<EOS
 "
>Release-Note:
>Audit-Trail:
>Unformatted:



Home | Main Index | Thread Index | Old Index