]> err.no Git - dpkg/commitdiff
Patches applied:
authorScott James Remnant <keybuk@debian.org>
Sat, 26 Jun 2004 16:42:14 +0000 (16:42 +0000)
committerScott James Remnant <keybuk@debian.org>
Sat, 26 Jun 2004 16:42:14 +0000 (16:42 +0000)
 * scott@netsplit.com--2004/dpkg--devo--1.10--patch-37
   remove non-posix test -a/-o in favour of && and ||

* scripts/dpkg-buildpackge.sh, scripts/dpkg-name.sh, methods/disk.update,
methods/disk.setup: Change non-POSIX -a and -o test options to shell
&& and || for portability.

ChangeLog
debian/changelog
debian/dpkg.postinst
debian/dpkg.prerm
methods/disk.setup
methods/disk.update
scripts/dpkg-buildpackage.sh
scripts/dpkg-name.sh

index 811e04b53ebc9f8924f4e3dbedfd1fa11578aa65..12161f56d73a49efbd975dba311b939bc71c21dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Jun 26 18:38:34 CEST 2004 David Weinehall <tao@debian.org>
+
+  * scripts/dpkg-buildpackge.sh, scripts/dpkg-name.sh, methods/disk.update,
+  methods/disk.setup: Change non-POSIX -a and -o test options to shell
+  && and || for portability.
+
 Sat Jun 26 16:41:31 CEST 2004 Changwoo Ryu <cwryu@debian.org>
 
   * po/ko.po: Updated.
index e4a0f379275e4fcc8c6c5e939426485076cbacc1..95da5fbd168f7c2a1ae665629d962f3a08d151df 100644 (file)
@@ -1,6 +1,7 @@
 dpkg (1.10.23) unstable; urgency=low
 
   * Updated hurd start-stop-daemon support.  Closes: #133640, #254180.
+  * Removed usage of non-POSIX test options.  Closes: #256302.
 
   * Architecture Support:
     - Renamed x86-64 to amd64.  Closes: #252346, #254598.
index 38d7f196e78ff5e24b8555f0c98f364590dd2800..0d65a1aa721aca2edd430b1039711c1ce6d86be6 100755 (executable)
@@ -19,7 +19,7 @@ EOF
 }
 
 if [ "x$1" = xconfigure ]; then
-       if [ -z "$2" -a ! -f /etc/dpkg/dpkg.cfg ] ; then
+       if [ -z "$2" ] && [ ! -f /etc/dpkg/dpkg.cfg ] ; then
                cp /usr/share/doc/dpkg/dpkg.cfg /etc/dpkg
        fi
 
@@ -35,7 +35,7 @@ if [ "x$1" = xconfigure ]; then
                                        continue
                                fi
                                h="`echo $g | sed -e 's/^K/S/'`"
-                               if ! [ -L $h -a -L $g ] \
+                               if ! [ -L $h ] && [ -L $g ] \
                                  || [ "`ls -Li $g 2>/dev/null | awk '{print $1}'`" != \
                                       "`ls -Li $h 2>/dev/null | awk '{print $1}'`" ]
                                then
@@ -114,8 +114,8 @@ OK.
        esac
 fi
 
-if [ -d /usr/info -a ! -L /usr/info -a ! -L /usr/info/dir \
-               -a -f /usr/info/dir ]; then              
+if [ -d /usr/info ] && [ ! -L /usr/info ] && [ ! -L /usr/info/dir ] \
+               && [ -f /usr/info/dir ]; then              
        echo Moving /usr/info/dir to /usr/share/info/dir.
        mv /usr/info/dir /usr/share/info/dir
        if [ -f /usr/info/dir.old ]; then
index c07e1d0e32cfd6127996330f5e3f4f7e45b3c033..786c4448049b773b51ee2b702aaae5fd616b3cd1 100755 (executable)
@@ -2,7 +2,7 @@
 
 set -e
 
-if [ ! \( "$1" = "upgrade" -o "$1" = "remove" \) ]; then
+if [ ! "$1" = "upgrade" ] && [ ! "$1" = "remove" ]; then
        exit 0
 fi
 
index 4d9535624594386e039dadaa2f9e9278f39cfd16..815b21a860a35a815c89fcee00fae3045064b7b2 100644 (file)
@@ -172,7 +172,7 @@ then
                        read response
                        response="`echo \"$response\" | sed -e 's/[     ]*$//'`"
                        if expr "$response" : '[0-9][0-9]*$' >/dev/null && \
-                          [ $response -ge 1 -a $response -le $ncdroms ]
+                          [ $response -ge 1 ] && [ $response -le $ncdroms ]
                        then
                                mountpoint="`sed -n $response'p' <$tp.l`"
                                echo
@@ -229,7 +229,7 @@ then
                echo -n \
 "What is the name of the NFS server ? [$defaultnfsserver]  "
                read response
-               if [ -z "$response" -a -n "$defaultnfsserver" ]
+               if [ -z "$response" ] && [ -n "$defaultnfsserver" ]
                then
                        response="$defaultnfsserver"
                fi
@@ -262,7 +262,7 @@ then
 What is the pathname on the NFS server of the filesystem with
 the Debian files? [$defaultnfsrempath]  "
                read response
-               if [ -z "$response" -a -n "$defaultnfsrempath" ]
+               if [ -z "$response" ] && [ -n "$defaultnfsrempath" ]
                then
                        response="$defaultnfsrempath"
                else
@@ -444,7 +444,7 @@ find_area () {
                check_binary $1 "$hierbase/$3/binary-$iarch"
        fi
 
-       if [ $option = cdrom -a $2 = nf -a -z "$this_binary" ]
+       if [ $option = cdrom ] && [ $2 = nf ] && [ -z "$this_binary" ]
        then
                echo '
 Note: most CD-ROM distributions of Debian do not include programs
@@ -453,7 +453,7 @@ This is because these programs have copyrights that prevent
 distribution for profit on a CD-ROM - ie they are not free software.
 If you wish to install these programs you'\''ll have to get them from an
 alternative source.'
-       elif [ $2 = lcl -a -z "$this_binary" ]
+       elif [ $2 = lcl ] && [ -z "$this_binary" ]
        then
                echo '
 Note: By default there is no `local'\'' directory. It is intended for 
@@ -466,7 +466,7 @@ packages you made yourself.'
 Which directory contains the *.deb packages from the $1 distribution
 area (this directory is named \`$3/binary-$iarch' on the distribution site) ?
 Say \`none' if this area is not available."
-               if [ $2 != main -a -z "$defaultbinary" ]
+               if [ $2 != main ] && [ -z "$defaultbinary" ]
                then
                        defaultbinary=none
                fi
@@ -474,7 +474,7 @@ Say \`none' if this area is not available."
 "Enter _$1_ binary dir. [$4]
  ?  "
                read response
-               if [ -z "$response" -a -n "$defaultbinary" ]
+               if [ -z "$response" ] && [ -n "$defaultbinary" ]
                then
                        response="$defaultbinary"
                fi
@@ -519,7 +519,7 @@ Where is the _$1_ \`Packages' file (if none is available, say \`none')
 [$5]
  ?  "
                        read response
-                       if [ -z "$response" -a -n "$5" ]
+                       if [ -z "$response" ] && [ -n "$5" ]
                        then
                                response="$5"
                        fi
index e27a284ab20c28602d4d6d695c8e81f51d715f39..4a90ed190ce083f0fdccf7d8a887fa279124ddad 100644 (file)
@@ -9,9 +9,9 @@ cd "$vardir/methods/disk"
 
 . ./shvar.$option
 
-if [ -z "$p_main_packages" -a -z "$p_ctb_packages" -a \
-     -z "$p_nf_packages" -a -z "$p_nus_packages " -a \
-     -z "$p_lcl_packages" ]
+if [ -z "$p_main_packages" ] && [ -z "$p_ctb_packages" ] && \
+   [ -z "$p_nf_packages" ] && [ -z "$p_nus_packages " ] && \
+   [ -z "$p_lcl_packages" ]
 then
        echo '
 No Packages files available, cannot update available packages list.
index 37c8f9f910a123099515c49e568524fa05d53175..57d5892f108543e2e3439cae03844463311f29b1 100755 (executable)
@@ -48,7 +48,7 @@ END
 
 rootcommand=''
 signcommand=""
-if [ -e $GNUPGHOME/secring.gpg -o -e $HOME/.gnupg/secring.gpg ] && \
+if ( [ -e $GNUPGHOME/secring.gpg ] || [ -e $HOME/.gnupg/secring.gpg ] ) && \
                command -v gpg > /dev/null 2>&1; then
        signcommand=gpg
 elif command -v pgp > /dev/null 2>&1 ; then
@@ -120,7 +120,7 @@ fi
 
 if test -n "$forcesigninterface" ; then
   signinterface=$forcesigninterface
-if [ "$signinterface" != "gpg" -a "$signinterface" != "pgp" ] ; then
+if [ "$signinterface" != "gpg" ] && [ "$signinterface" != "pgp" ] ; then
        echo >&2 "$progname: invalid sign interface specified"
        exit 1
 fi
@@ -200,7 +200,7 @@ if [ x$sourceonly = x ]; then
        withecho $rootcommand debian/rules $binarytarget
 fi
 if [ "$usepause" = "true" ] && \
-   [  "$signchanges" != ":" -o \( -z "$binaryonly"  -a "$signsource" != ":" \) ] ; then
+   ( [ "$signchanges" != ":" ] || ( [ -z "$binaryonly" ] && [ "$signsource" != ":" ] ) ) ; then
     echo Press the return key to start signing process
     read dummy_stuff
 fi
index c67289f6ee8cd99613db90c487820232fee1e89d..8f897291f632106c510d7b0ec70a3c2481fd8e67 100755 (executable)
@@ -70,7 +70,7 @@ getname () {
 
                a=`dpkg-deb -f -- "$1" architecture`;
                a=`echo $a|sed -e 's/ *//g'`;
-               if [ -z "$a" -a -n "$noarchitecture" ]; # arch field empty, or ignored
+               if [ -z "$a" ] && [ -n "$noarchitecture" ]; # arch field empty, or ignored
                then
                        a=`dpkg --print-installation-architecture`;
                        stderr "assuming architecture \`"$a"' for \`"$1"'";
@@ -103,7 +103,7 @@ getdir () {
                                s="no-section";
                                stderr "assuming section \`"no-section"' for \`"$1"'";
                        fi
-                       if [ "$s" != "non-free" -a "$s" != "contrib" -a "$s" != "no-section" ];
+                       if [ "$s" != "non-free" ] && [ "$s" != "contrib" ] && [ "$s" != "no-section" ];
                        then
                                dir=`echo unstable/binary-$a/$s`;
                        else
@@ -147,7 +147,7 @@ move () {
                if [ $newname -ef "$1" ]; # same device and inode numbers
                then
                        stderr "skipping \`"$1"'";
-               elif [ -f $newname -a -z "$overwrite" ];
+               elif [ -f $newname ] && [ -z "$overwrite" ];
                then
                        stderr "can't move \`"$1"' to existing file";
                elif `$command "$1" $newname`;