pkgsrc-Bugs archive

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

pkg/32372: pkgtools/createbuildlink wrong behaviour on Solaris 5.8



>Number:         32372
>Category:       pkg
>Synopsis:       pkgtools/createbuildlink wrong behaviour on Solaris 5.8
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 23 18:40:00 +0000 2005
>Originator:     Mikhail
>Release:        None
>Organization:
stzi
>Environment:
SunOS main 5.8 Generic_117351-24 i86pc i386 i86pc
>Description:
I'm using pkgsrc framework on Solaris 5.8, and it's /bin/sh doesn't recognize:

1) bang sign (`!') in 'if' language construction
2) ${#parameter} (string length) syntax

So, when I'm running createbuildlink (pkgtools/createbuildlink) /bin/sh 
complains in two parts of the script (see patch) and doesn't produce expected 
output.

Sorry for my english.
>How-To-Repeat:
Simply run createbuildlink on Solaris 5.8.
>Fix:
Here is the patch:
--- createbuildlink   2005-12-23 20:33:45.604157000 +0300
+++ createbuildlink.orig        2005-12-23 20:34:22.902393000 +0300
@@ -93,9 +93,7 @@
 PREFIX=X11PREFIX
 USE_X11BASE=`/usr/pkg/bin/bmake show-var VARNAME=USE_X11BASE`
 if [ -z "$USE_X11BASE" ]; then
-       if grep "^USE_X11BASE" $makefile $commons > /dev/null; then
-               :
-       else
+       if ! grep "^USE_X11BASE" $makefile $commons > /dev/null; then
                PREFIX=LOCALBASE
        fi
 fi
@@ -132,11 +130,9 @@
 EOF
 
 gap="  "
-PKGUPPER_LEN=`echo ${PKGUPPER} | wc -c | tr -d '[:space:]'`
 for i in 1 2 3; do
        n=`expr $i \* $spacesintab`
-       if [ ${PKGUPPER_LEN} -ge $n ]; then
-               exit
+       if [ ${#PKGUPPER} -ge $n ]; then
                gap="   $gap"
        fi
 done




Home | Main Index | Thread Index | Old Index