pkgsrc-Bugs archive

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

pkg/48089: Some platform do not support type command.



>Number:         48089
>Category:       pkg
>Synopsis:       Some platform do not support type command.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 28 07:40:00 +0000 2013
>Originator:     nullnilaki
>Release:        
>Organization:
japan
>Environment:
BSD/OS 4.3 BSDI BSD/OS 4.3 Kernel #0: Thu Oct  4 09:41:46 MDT 2001     
polk%hephaestus.DELOS.COM@localhost:/mnt/proto/4.3-i386/usr/src/sys/compile/GENERIC
  i386
>Description:
1: Error
===============================================================
devel/bmake/files/boot-strap
gcc -o bmake main.o meta.o arch.o buf.o compat.o cond.o dir.o for.o getopt.o 
hash.o job.o make.o make_malloc.o parse.o sigcompat.o str.o strlist.o suff.o 
targ.o trace.o var.o util.o lstAppend.o lstDupl.o lstInit.o lstOpen.o 
lstAtEnd.o lstEnQueue.o lstInsert.o lstAtFront.o lstIsAtEnd.o lstClose.o 
lstFind.o lstIsEmpty.o lstRemove.o lstConcat.o lstFindFrom.o lstLast.o 
lstReplace.o lstFirst.o lstDatum.o lstForEach.o lstMember.o lstSucc.o 
lstDeQueue.o lstForEachFrom.o lstDestroy.o lstNext.o lstPrev.o dirname.o 
stresep.o
type: not found
cd /usr/pkgsrc/bootstrap/work/bmake/bootstrap.BSDOS/unit-tests && 
/usr/pkgsrc/bootstrap/work/bmake/bootstrap.BSDOS/bmake -r -m / 
TEST_MAKE=/usr/pkgsrc/bootstrap/work/bmake/bootstrap.BSDOS/bmake test
/usr/pkgsrc/bootstrap/work/bmake/bootstrap.BSDOS/bmake -f Makefile > test.out 
2>&1
-u /usr/pkgsrc/bootstrap/work/bmake/unit-tests/test.exp test.out
bmake: exec(-u) failed (No such file or directory)
*** Error code 1
===============================================================
devel/bmake/files/unit-tests/modts
/usr/pkgsrc/bootstrap/work/bmake/bootstrap.BSDOS/bmake -f Makefile > test.out 
2>&1
/usr/bin/diff -u /usr/pkgsrc/bootstrap/work/bmake/unit-tests/test.exp test.out
--- /usr/pkgsrc/bootstrap/work/bmake/unit-tests/test.exp Wed Jul 24 00:32:59 
2013
+++ test.out Wed Jul 24 00:33:40 2013
@@ -139,6 +139,8 @@
BADMOD 1 = }
make: Bad modifier `:OxXX' for LIST
BADMOD 2 = XX}
+type: not found
+type: not found
LIST="one two three four five six"
LIST:ts,="one,two,three,four,five,six"
LIST:ts/:tu="ONE/TWO/THREE/FOUR/FIVE/SIX"
*** Error code 1
===============================================================
2: Surce
===============================================================
devel/bmake/files/unit-tests/modts
.if ${type print 2> /dev/null || echo:L:sh:Mbuiltin} != ""
PRINT= print -r --
.elif ${type printf 2> /dev/null || echo:L:sh:Mbuiltin} != ""
PRINT= printf '%s\n'
.else
PRINT= echo
.endif
===============================================================
devel/bmake/files/unit-tests/modts
# make sure test below uses the same diff that configure did
TOOL_DIFF=`type diff | sed 's,[()],,g;s,^[^/][^/]*,,;q'`
===============================================================
3: Summary
Some platform (BSD/OS?) do not support type command.
$ type
type: not found


>How-To-Repeat:

>Fix:
I carry out a modified script test of that platform.

NetBSD 6.1 NetBSD 6.1 (GENERIC) i386
Darwin 9.0.0 Darwin Kernel Version 9.0.0: Tue Oct  9 21:35:55 PDT 2007; 
root:xnu-1228~1/RELEASE_I386 i386
SunOS 5.9 Generic_122300-03 sun4u sparc SUNW,Sun-Blade-1500
IRIX64 6.5 01062343 IP35
OSF1 V5.1 2650 alpha
HP-UX B.11.11 U 9000/785 2257270770 unlimited-user license
BSD/OS 4.3 BSDI BSD/OS 4.3 Kernel #0: Thu Oct  4 09:41:46 MDT 2001     
polk%hephaestus.DELOS.COM@localhost:/mnt/proto/4.3-i386/usr/src/sys/compile/GENERIC
  i386

===============================================================
$ diff -Naru modts.orig modts     
--- modts.orig  Sun Jul 28 14:38:48 2013
+++ modts       Sun Jul 28 14:39:47 2013
@@ -12,13 +12,14 @@
 # Use print or printf iff they are builtin.
 # XXX note that this causes problems, when make decides 
 # there is no need to use a shell, so avoid where possible.
-.if ${type print 2> /dev/null || echo:L:sh:Mbuiltin} != ""
+.if ${(print x) 2> /dev/null || echo:L:sh} == "x"
 PRINT= print -r --
-.elif ${type printf 2> /dev/null || echo:L:sh:Mbuiltin} != ""
+.elif ${(printf x) 2> /dev/null || echo:L:sh} == "x"
 PRINT= printf '%s\n'
 .else
 PRINT= echo
 .endif
+
 
 mod-ts:
        @echo 'LIST="${LIST}"'
===============================================================
$ diff -Naru boot-strap.orig boot-strap     
--- boot-strap.orig     Sun Jul 28 15:07:57 2013
+++ boot-strap  Sun Jul 28 15:09:34 2013
@@ -310,7 +310,14 @@
         esac
 fi
 # make sure test below uses the same diff that configure did
-TOOL_DIFF=`type diff | sed 's,[()],,g;s,^[^/][^/]*,,;q'`
+case "`(type $SHELL) 2> /dev/null`" in
+    /*)
+        TOOL_DIFF=`type diff | sed 's,[()],,g;s,^[^/][^/]*,,;q'`
+        ;;
+    *)
+        TOOL_DIFF=`which diff`
+        ;;
+esac
 export MAKESYSPATH TOOL_DIFF
 if [ "$mksrc" ]; then
         $objdir/bmake test || exit 1
===============================================================

I think other platform may be work...



Home | Main Index | Thread Index | Old Index