Bug 15759 - Fix testit.sh script in popt-1.5 for braindead /bin/sh implementations
Summary: Fix testit.sh script in popt-1.5 for braindead /bin/sh implementations
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: popt
Version: 6.2
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-08 19:43 UTC by David D. Kilzer
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-08-08 19:43:15 UTC
Embargoed:


Attachments (Terms of Use)

Description David D. Kilzer 2000-08-08 19:43:14 UTC
The following patch to popt-1.5/testit.sh will fix braindead
implementations of /bin/sh
as found on Solaris 7 (and probably others).  This makes 'make check' work
again.

NOTE: This patch also applies cleanly to rpm-3.0.5/popt/testit.sh.

diff -u6 popt-1.5/testit.sh.orig popt-1.5/testit.sh
--- popt-1.5/testit.sh.orig     Tue Aug  8 13:34:23 2000
+++ popt-1.5/testit.sh  Tue Aug  8 13:35:41 2000
@@ -33,14 +33,20 @@
 run test1 "test1 - 10" "arg1: 0 arg2: (none) arg3: 50" -3 50
 run test1 "test1 - 11" "arg1: 0 arg2: bar" -T bar
 run test1 "test1 - 12" "arg1: 1 arg2: (none)" -O 
 run test1 "test1 - 13" "arg1: 1 arg2: foo" -OT foo
 run test1 "test1 - 14" "arg1: 0 arg2: (none) inc: 1" --inc
 run test1 "test1 - 15" "arg1: 0 arg2: foo inc: 1" -i --arg2 foo
-POSIX_ME_HARDER=1 run test1 "test1 - 16" "arg1: 1 arg2: (none) rest: foo
--arg2 something" --arg1 foo --arg2 something
-POSIXLY_CORRECT=1 run test1 "test1 - 17" "arg1: 1 arg2: (none) rest: foo
--arg2 something" --arg1 foo --arg2 something
+POSIX_ME_HARDER=1
+export POSIX_ME_HARDER
+run test1 "test1 - 16" "arg1: 1 arg2: (none) rest: foo --arg2 something"
--arg1 foo --arg2 something
+unset POSIX_ME_HARDER
+POSIXLY_CORRECT=1
+export POSIXLY_CORRECT
+run test1 "test1 - 17" "arg1: 1 arg2: (none) rest: foo --arg2 something"
--arg1 foo --arg2 something
+unset POSIXLY_CORRECT
 run test1 "test1 - 18" "callback: c sampledata bar arg1: 1 arg2: (none)"
--arg1 --cb bar
 run test1 "test1 - 19" "${test1} ;" --echo-args
 run test1 "test1 - 20" "${test1} ; --arg1" --echo-args --arg1
 run test1 "test1 - 21" "${test1} ; --arg2 something" -T something -e
 run test1 "test1 - 22" "${test1} ; --arg2 something -- more args" -T
something -a more args
 run test1 "test1 - 23" "${test1} ; --echo-args -a" --echo-args -e -a

Comment 1 Jeff Johnson 2000-08-11 15:26:13 UTC
 FIxed in CVS, thanks for the patch.

Comment 2 Need Real Name 2001-01-04 21:56:41 UTC
the popt source which i obtained from the rpm v4 source tree (another bug imo)
does not have this patch included.  on solaris 2.6, i still had to change the
combined 'export BLA=1' lines to separate 'BLA=1 ; export BLA' lines.  please
make sure this patch is truely applied.


Note You need to log in before you can comment on or make changes to this bug.