pkgsrc-Bugs archive

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

pkg/51142: pdksh has occasional issues with empty 'for' loops



>Number:         51142
>Category:       pkg
>Synopsis:       pdksh has occasional issues with empty 'for' loops
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 15 17:05:00 +0000 2016
>Originator:     Richard PALO
>Release:        current
>Organization:
>Environment:
SunOS omnis 5.11 omnios-master-5409e8f i86pc i386 i86pc

>Description:
the following configure snippet always fails on my platform when using pdksh as my configure shell (noticed with evince3):

# ================ yelp-tools stuff ============= #

YELP_LC_MEDIA_LINKS=true
YELP_LC_DIST=true

for yelpopt in ; do
  case $yelpopt in
    lc-media-links)    YELP_LC_MEDIA_LINKS=true ;;
    no-lc-media-links) YELP_LC_MEDIA_LINKS= ;;
    lc-dist)           YELP_LC_DIST=true ;;
    no-lc-dist)        YELP_LC_DIST= ;;
    *) as_fn_error $? "Unrecognized YELP_HELP_INIT option $yelpopt\"" "$LINENO" 5 ;;
  esac
done;

at configure time this gives (for example):
>configure: error: Unrecognized YELP_HELP_INIT option dummy"
>*** Error code 1

'dummy' seems to only be used via 'set dummy blahbla; ac_word=$2'
type of things.

Seems to be cases where something in pdksh isn't reinitialised
correctly, as manually running the snippet in isolation doesn't
show the problem.

bash and ksh93 work fine too



>How-To-Repeat:
see above, but a quick work-around patch that seems to work is:
diff --git a/print/evince3/patches/patch-configure b/print/evince3/patches/patch-configure
new file mode 100644
index 0000000..f81f857
--- /dev/null
+++ b/print/evince3/patches/patch-configure
@@ -0,0 +1,21 @@
+$NetBSD$
+
+deal with YELP_HELP_INIT invoked with no options
+
+--- configure.orig     2016-03-21 16:28:17.000000000 +0000
++++ configure
+@@ -22382,12 +22382,13 @@ fi
+ YELP_LC_MEDIA_LINKS=true
+ YELP_LC_DIST=true
+ 
+-for yelpopt in ; do
++for yelpopt in z-end; do
+   case $yelpopt in
+     lc-media-links)    YELP_LC_MEDIA_LINKS=true ;;
+     no-lc-media-links) YELP_LC_MEDIA_LINKS= ;;
+     lc-dist)           YELP_LC_DIST=true ;;
+     no-lc-dist)        YELP_LC_DIST= ;;
++    z-end)             ;;
+     *) as_fn_error $? "Unrecognized YELP_HELP_INIT option $yelpopt\"" "$LINENO" 5 ;;
+   esac
+ done;

(I also have a patch for yelp.m4 in wip/yelp-tools)
>Fix:



Home | Main Index | Thread Index | Old Index