Subject: pkg/34976: sysutils/xentools30 fails "test ==" portability check
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <kre@munnari.OZ.AU>
List: pkgsrc-bugs
Date: 11/02/2006 13:00:02
>Number:         34976
>Category:       pkg
>Synopsis:       sysutils/xentools30 fails "test ==" portability check
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 02 13:00:02 +0000 2006
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15  (pkgsrc current today)
>Organization:
	Prince Of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006 kre@jade.coe.psu.ac.th:/usr/obj/current/kernels/JADE_ASUS i386
Architecture: i386
Machine: i386
>Description:
	Scripts in sysutils/xentools30 apparently were written on a linux
	system where (for whatever weird reason) users are being taught that
	"test x == y" is the correct way to write scripts.

>How-To-Repeat:
	Attempt to build sysutils/xentools30 on a system with
	PKG_DEVELOPER=yes (and a pgksrc version recent enough to
	have the "test ==" posrability check included).

		(I'm actually using today's pkgsrc, and pkg_comp,
		with libkver, and NetBSD-3.0 release sets installed,
		just for complete info - I doubt any of that is relevant)

	Expect to see ...

=> Checking for portability problems in extracted files
ERROR: [check-portability.sh] => Found test ... == ...:
ERROR: [check-portability.sh] examples/blktap: if [ "$command" == 'add' ]
ERROR: [check-portability.sh] examples/block: if [ "$mode" == 'w' ]
ERROR: [check-portability.sh] examples/block: if [ "$d" == "$devmm" ]
ERROR: [check-portability.sh] examples/block: if [ "$d" == "$devmm" ]
ERROR: [check-portability.sh] examples/block: if [ "$mode" == 'w' ]
ERROR: [check-portability.sh] examples/block: if [ "$m" == 'w' ]
ERROR: [check-portability.sh] examples/block: [ "$FRONTEND_UUID" == "$othervm" ]
ERROR: [check-portability.sh] examples/block: if [ "$mode" == '!' ]
ERROR: [check-portability.sh] examples/block: if [ "$result" == 'guest' ]
ERROR: [check-portability.sh] examples/block: if [ "$mode" == 'w' ]
ERROR: [check-portability.sh] examples/block: if [ "$mode" == 'w' ] && ! stat "$file" -c %A | grep -q w
ERROR: [check-portability.sh] examples/block: if [ "$mode" == '!' ]
ERROR: [check-portability.sh] examples/block: if [ "$d" == "$dev" ]
ERROR: [check-portability.sh] examples/block: if [ "$f" == "$file" ]
ERROR: [check-portability.sh] examples/block: if [ "$loopdev" == '' ]
ERROR: [check-portability.sh] examples/block: if [ "$loopdev" == '' ]
ERROR: [check-portability.sh] examples/vif-route: if [ "$command" == "online" ]
ERROR: [check-portability.sh] examples/vif-nat: if [ "$ip" == "" ]
ERROR: [check-portability.sh] examples/vif-nat: if [ "$command" == "online" ]
ERROR: [check-portability.sh] examples/external-device-migrate: if [ "$1" == "-step" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: elif [ "$1" == "-host" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: elif [ "$1" == "-domname" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: elif [ "$1" == "-type" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: elif [ "$1" == "-subtype" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: elif [ "$1" == "-recover" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: elif [ "$1" == "-help" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: if [ "$step"    == "" -o             "$host"    == "" -o             "$typ"     == "" -o            "$domname" == "" ]; then
ERROR: [check-portability.sh] examples/external-device-migrate: if [ "$recover" == "1" ]; then
ERROR: [check-portability.sh] examples/vif-bridge: if [ "$command" == "online" ]
*** Error code 1

Stop.

>Fix:
	Add patches to change all of those == operators to =