pkgsrc-Bugs archive

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

pkg/41446: bootstrap: infinite loop on read-only pkgsrc



>Number:         41446
>Category:       pkg
>Synopsis:       bootstrap: infinite loop on read-only pkgsrc
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 17 09:45:00 +0000 2009
>Originator:     Aleksey Cheusov
>Release:        NetBSD 5.0_STABLE
>Organization:
>Environment:
System: NetBSD chen.chizhovka.net 5.0_STABLE NetBSD 5.0_STABLE (GENERIC) #5: 
Fri May 1 16:04:32 EEST 2009 
cheusov%chen.chizhovka.net@localhost:/srv/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
1) read-only /usr/pkgsrc directory
2) cd /usr/pkgsrc/bootstrap
2) ./bootstrap # without --workdir argument
In this case an error message and non-zero exit status is expected.
But in reality bootstrap segfaults (under Linux) due to infinite loop.
>Fix:
Index: bootstrap
===================================================================
RCS file: /cvsroot/pkgsrc/bootstrap/bootstrap,v
retrieving revision 1.144
diff -u -r1.144 bootstrap
--- bootstrap   23 Apr 2009 00:15:53 -0000     1.144
+++ bootstrap   17 May 2009 09:38:49 -0000
@@ -284,7 +284,7 @@
 {
        [ -d "$1" ] && return 0
        mkdir -p "$1" 2> /dev/null && return 0
-       mkdir_p_early `basename "$1"`
+       mkdir_p_early `dirname "$1"`
        if [ ! -d "$1" ] && mkdir "$1"; then
                echo_msg "mkdir $1 exited with status $?"
                die "aborted."



Home | Main Index | Thread Index | Old Index