Browse Source

Apply patch to make dpkg work with POSIX 1003.1-2001.

Adam Heath 23 years ago
parent
commit
be700a700f
7 changed files with 25 additions and 14 deletions
  1. 7 1
      ChangeLog
  2. 10 8
      automake/tools.m4
  3. 3 0
      debian/changelog
  4. 1 1
      dselect/Makefile.in
  5. 2 2
      methods/disk.setup
  6. 1 1
      scripts/dpkg-parsechangelog.pl
  7. 1 1
      scripts/dpkg-source.pl

+ 7 - 1
ChangeLog

@@ -1,4 +1,10 @@
-Sat Sep 13 15:45:10 CDT 2003 Adam Heath <doogie@debian.org>
+Sat Sep 13 15:56:13 CDT 2003 Adam Heath <doogie@debian.org>
+
+  * automake/tools.m4, dselect/Makefile.in, methods/disk.setup,
+    scripts/dpkg-parsechangelog.pl, scripts/dpkg-source.pl: Apply patch to
+    make dpkg work with POSIX 1003.1-2001.
+
+Sat Sep 13 15:40:39 CDT 2003 Adam Heath <doogie@debian.org>
 
   * lib/database.c: Apply patch to change hashing function, and increase
     bin size, for the package database.

+ 10 - 8
automake/tools.m4

@@ -18,13 +18,13 @@ AC_BEFORE([AC_CANONICAL_HOST])
 AC_BEFORE([AC_CANONICAL_BUILD])
 dnl Quick check
 if test "$host_alias" = ""; then
-  if test $host = NONE -a $build != NONE; then
+  if test $host = NONE && test $build != NONE; then
     thost=$nonopt
   else
     thost=$host
   fi
 
-  if test $thost != $build -a $thost != NONE; then
+  if test $thost != $build && test $thost != NONE; then
     ac_tool_prefix=${thost}-
     ac_tool_dir=${thost}
   else
@@ -54,8 +54,8 @@ AC_DEFUN(tl_CHECK_TOOL,
 AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
 	      ifelse([$3], , [$2], ), $4, $5)
 if test "$ac_tool_dir" != ""; then
-  if test -z "$ac_cv_prog_$1" -a "$5" != "/usr/${ac_tool_dir}/bin/$2" -a \
-	"$5" != "/usr/local/${ac_tool_dir}/bin/$2"; then
+  if test -z "$ac_cv_prog_$1" && test "$5" != "/usr/${ac_tool_dir}/bin/$2" &&
+	test "$5" != "/usr/local/${ac_tool_dir}/bin/$2"; then
     if test -f /usr/${ac_tool_dir}/bin/$2; then $1="/usr/${ac_tool_dir}/bin/$2"
     elif test -f /usr/local/${ac_tool_dir}/bin/$2; then $1="/usr/local/${ac_tool_dir}/bin/$2"
     fi
@@ -100,8 +100,9 @@ if test -z "$CC"; then
   AC_CHECK_TOOL(CC, cc, cc, , , /usr/ucb/cc)
   test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 fi
-if test -n "$ac_tool_prefix" -a "`echo $CC | grep '$ac_tool_prefix'`" = "" \
-	-a "`echo $CC | grep -- '-b'`" = ""; then
+if test -n "$ac_tool_prefix" &&
+   test "`echo $CC | grep '$ac_tool_prefix'`" = "" &&
+   test "`echo $CC | grep -- '-b'`" = ""; then
   if $CC -v 2>&1 | grep -q gcc; then
     AC_CACHE_CHECK([if $CC -b${ac_tool_dir} works], tl_cv_prog_cc_bhost,[
     old_cc="${CC}"
@@ -151,8 +152,9 @@ AC_DEFUN(tl_PROG_CXX,
 AC_PROVIDE([AC_PROG_CXX])dnl
 tl_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
 if test -n "$CXX"; then
-  if test -n "$ac_tool_prefix" -a "`echo $CXX | grep '$ac_tool_prefix'`" = "" \
-	-a "`echo $CXX | grep -- '-b'`" = ""; then
+  if test -n "$ac_tool_prefix" &&
+     test "`echo $CXX | grep '$ac_tool_prefix'`" = "" &&
+     test "`echo $CXX | grep -- '-b'`" = ""; then
     if $CXX -v 2>&1 | grep -q gcc; then
       AC_CACHE_CHECK([if $CXX -b${ac_tool_dir} works], tl_cv_prog_cxx_bhost,[
       old_cxx="${CXX}"

+ 3 - 0
debian/changelog

@@ -23,6 +23,9 @@ dpkg (1.10.11) unstable; urgency=low
   * Daniel Silverstone <dsilvers@digital-scurf.org>:
     Apply patch to change hashing function, and increase bin size, for
     the package database.  Closes: #206416
+  * Paul Eggert <eggert@CS.UCLA.EDU>:
+    Apply patch to make dpkg work with POSIX 1003.1-2001.  Closes:
+    #204894
 
  -- Wichert Akkerman <debian@extern.wiggy.net>  UNRELEASED
 

+ 1 - 1
dselect/Makefile.in

@@ -58,7 +58,7 @@ $(srcdir)/helpmsgs.h $(srcdir)/helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl
 
 curkeys.h: keyoverride $(srcdir)/mkcurkeys.pl
 	cursesfile=`echo '#include <curses.h>' | \
-		 $(CC) -E - | grep 'curses.h' | head -1 | \
+		 $(CC) -E - | grep 'curses.h' | head -n 1 | \
 		 $(SED) -e 's/^[^"]*"//; s/".*$$//'`; \
 	if [ "$$cursesfile" = "" ]; then echo "can't find curses file"; exit 1; fi; \
 	perl $(srcdir)/mkcurkeys.pl $< $$cursesfile > $@

+ 2 - 2
methods/disk.setup

@@ -166,7 +166,7 @@ then
 		do
 			echo \
 	'Several CD-ROMs (or other ISO9660 filesystems) are mounted:'
-			egrep 'type iso9660 \([^)]*\)$' <$tp.m | nl
+			grep 'type iso9660 ([^)]*)$' <$tp.m | nl
 			echo -n \
 	'Is it any of these ?  Type a number, or `n'\'' for none.  '
 			read response
@@ -422,7 +422,7 @@ check_binary () {
 	fi
 
 	if ! ( find "$mountpoint$2/" -follow -name '*.deb' -print \
-	        | head -1 ) 2>/dev/null  | grep . >/dev/null
+	        | head -n 1 ) 2>/dev/null  | grep . >/dev/null
 	then
 		echo "\`$2' does not contain any *.deb packages.  Hmmpf."
 		return

+ 1 - 1
scripts/dpkg-parsechangelog.pl

@@ -51,7 +51,7 @@ $changelogfile= "./$changelogfile" if $changelogfile =~ m/^\s/;
 if (not $force and $changelogfile ne "-") {
     open(STDIN,"< $changelogfile") ||
         &error("cannot open $changelogfile to find format: $!");
-    open(P,"tail -40 |") || die "cannot fork: $!\n";
+    open(P,"tail -n 40 |") || die "cannot fork: $!\n";
     while(<P>) {
         next unless m/\schangelog-format:\s+([0-9a-z]+)\W/;
         $format=$1;

+ 1 - 1
scripts/dpkg-source.pl

@@ -1005,7 +1005,7 @@ sub extracttar {
 }
 
 sub cpiostderr {
-    open(STDERR,"| egrep -v '^[0-9]+ blocks\$' >&2") ||
+    open(STDERR,"| grep -E -v '^[0-9]+ blocks\$' >&2") ||
         &syserr("reopen stderr for tar to grep out blocks message");
 }