From be700a700f3ffc7781836e5c6d8d408cbf21705e Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sat, 13 Sep 2003 20:59:03 +0000 Subject: [PATCH] Apply patch to make dpkg work with POSIX 1003.1-2001. --- ChangeLog | 8 +++++++- automake/tools.m4 | 18 ++++++++++-------- debian/changelog | 3 +++ dselect/Makefile.in | 2 +- methods/disk.setup | 4 ++-- scripts/dpkg-parsechangelog.pl | 2 +- scripts/dpkg-source.pl | 2 +- 7 files changed, 25 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f9f6e6c..c3a4f637 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -Sat Sep 13 15:45:10 CDT 2003 Adam Heath +Sat Sep 13 15:56:13 CDT 2003 Adam Heath + + * 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 * lib/database.c: Apply patch to change hashing function, and increase bin size, for the package database. diff --git a/automake/tools.m4 b/automake/tools.m4 index 65574d6a..66995d60 100644 --- a/automake/tools.m4 +++ b/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}" diff --git a/debian/changelog b/debian/changelog index 78431de5..4c645d6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,9 @@ dpkg (1.10.11) unstable; urgency=low * Daniel Silverstone : Apply patch to change hashing function, and increase bin size, for the package database. Closes: #206416 + * Paul Eggert : + Apply patch to make dpkg work with POSIX 1003.1-2001. Closes: + #204894 -- Wichert Akkerman UNRELEASED diff --git a/dselect/Makefile.in b/dselect/Makefile.in index d82f763a..f50b349d 100644 --- a/dselect/Makefile.in +++ b/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 ' | \ - $(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 > $@ diff --git a/methods/disk.setup b/methods/disk.setup index 68820aa3..4d953562 100644 --- a/methods/disk.setup +++ b/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 diff --git a/scripts/dpkg-parsechangelog.pl b/scripts/dpkg-parsechangelog.pl index f2e2030f..6c612091 100755 --- a/scripts/dpkg-parsechangelog.pl +++ b/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(

) { next unless m/\schangelog-format:\s+([0-9a-z]+)\W/; $format=$1; diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index cf949d05..57b47f30 100755 --- a/scripts/dpkg-source.pl +++ b/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"); } -- 2.39.5