+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.
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.
}
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
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
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
set -e
-if [ ! \( "$1" = "upgrade" -o "$1" = "remove" \) ]; then
+if [ ! "$1" = "upgrade" ] && [ ! "$1" = "remove" ]; then
exit 0
fi
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
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
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
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
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
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
"Enter _$1_ binary dir. [$4]
? "
read response
- if [ -z "$response" -a -n "$defaultbinary" ]
+ if [ -z "$response" ] && [ -n "$defaultbinary" ]
then
response="$defaultbinary"
fi
[$5]
? "
read response
- if [ -z "$response" -a -n "$5" ]
+ if [ -z "$response" ] && [ -n "$5" ]
then
response="$5"
fi
. ./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.
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
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
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
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"'";
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
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`;