NetBSD Problem Report #35467

From kre@munnari.OZ.AU  Tue Jan 23 10:22:21 2007
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 6BE3563B852
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 23 Jan 2007 10:22:21 +0000 (UTC)
Message-Id: <200701231021.l0NAL2Mg022749@jade.coe.psu.ac.th>
Date: Tue, 23 Jan 2007 17:21:02 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@NetBSD.org
Subject: net/speedtouch contains "test ==" portability bug
X-Send-Pr-Version: 3.95

>Number:         35467
>Category:       pkg
>Synopsis:       net/speedtouch contains "test ==" portability bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rillig
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 23 10:25:00 +0000 2007
>Closed-Date:    Wed Jan 24 17:41:04 +0000 2007
>Last-Modified:  Wed Jan 24 17:45:03 +0000 2007
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15   (pkgsrc current inthin last half day)
>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:
	net/speedtouch uses [ xx == yy ] (many times).

>How-To-Repeat:
	Build net/speedtouch with PKG_DEVELOPER set (as for example
	happens by default using pkg_comp) and expect to see ...

=> Checking for portability problems in extracted files
ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd: if [ $PERSISTA == "Y" ] || [ $PERSISTA == "y" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd: if [ $PERSISTA == "Y" ] || [ $PERSISTA == "y" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd: if [ $DNSPEERA == "Y" ] || [ $DNSPEERA == "y" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd: if [ $DNSPEERA == "Y" ] || [ $DNSPEERA == "y" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd: if [ $DEFA == "Y" ] || [ $DEFA == "y" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd: if [ $DEFA == "Y" ] || [ $DEFA == "y" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd: if [ $DEBUGA == "Y" ] || [ $DEBUGA =="y" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd:   if [ $ANSWER == "n" ] || [ $ANSWER == "N" ] ; then
ERROR: [check-portability.awk] doc-linux/adsl-conf-pppd:   if [ $ANSWER == "n" ] || [ $ANSWER == "N" ] ; then

Explanation:
===========================================================================
The "test" command, as well as the "[" command, are not required to know
[... rest deleted here ...]
===========================================================================

ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] src/speedtouch-setup.in:   if [ $ANSWER == "n" ] || [ $ANSWER == "N" ] ; then
ERROR: [check-portability.awk] src/speedtouch-setup.in:   if [ $ANSWER == "n" ] || [ $ANSWER == "N" ] ; then
ERROR: [check-portability.awk] src/speedtouch-setup.in:   if [ $ANSWER == "n" ] || [ $ANSWER == "N" ] ; then
ERROR: [check-portability.awk] src/speedtouch-setup.in:   if [ $ANSWER == "n" ] || [ $ANSWER == "N" ] ; then

Explanation:
[... deleted again ...]

ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] src/speedtouch-start.in: if [ "${PPPD_PEER}" == "" ]; then

Explanation:
[... deleted again ...]


*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/net/speedtouch
*** Error code 1


>Fix:
	Patch the ones that matter to use '=' instead of '==', that probably
	includes src/speedtouch-setup.in and src/speedtouch-start.in
	but I'd guess perhaps not doc-linux/adsl-conf-pppd which can
	probably be fixed by just excluding it from the check (but I
	am guessing, and patching these things hsould be pretty easy...)

	If anyone who cares is reading this, fixing check-portability.awk
	so it only issues that lengthy explanation for the problem
	(if it is really needed at all) once per package would be kind
	of useful (have it copy the explanation from a file, then remove
	the file when it has been written once - or something).

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->abs
Responsible-Changed-By: reed@netbsd.org
Responsible-Changed-When: Tue, 23 Jan 2007 16:39:05 +0000
Responsible-Changed-Why:
Assign to maintainer.
(For second issue, maybe assign to rillig.)


Responsible-Changed-From-To: abs->rillig
Responsible-Changed-By: rillig@netbsd.org
Responsible-Changed-When: Wed, 24 Jan 2007 17:41:04 +0000
Responsible-Changed-Why:
I'll take it.


State-Changed-From-To: open->closed
State-Changed-By: rillig@netbsd.org
State-Changed-When: Wed, 24 Jan 2007 17:41:04 +0000
State-Changed-Why:
I have fixed it. Thanks for the PR.

(I accidentally mentioned the wrong PR in the CVS commit message,
 so they won't show up here. It's distinfo 1.9, patch-ag 1.1 and
 patch-ah 1.1.)


From: Roland Illig <rillig@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/35467 CVS commit: pkgsrc/net/speedtouch
Date: Wed, 24 Jan 2007 17:44:02 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	rillig
 Date:		Wed Jan 24 17:44:02 UTC 2007

 Modified Files:
 	pkgsrc/net/speedtouch: Makefile

 Log Message:
 Fixed "test ==", which was reported in PR 35467.


 To generate a diff of this commit:
 cvs rdiff -r1.23 -r1.24 pkgsrc/net/speedtouch/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.