Bug#531680: debootstrap: Should not use obsolete dpkg --print-installation-architecture
Package: debootstrap Version: 1.0.13 Tags: patch The new dpkg in sid warns now that --print-installation-architecture is obsolete: fz:~# debootstrap sid chroot http://ftp.de.debian.org/debian dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. This patch solves it. --- debootstrap 2009-04-24 21:08:35.0 +0200 +++ debootstrap 2009-06-03 11:11:23.0 +0200 @@ -335,8 +335,8 @@ if [ $ARCH != ]; then true elif [ -x /usr/bin/dpkg ] \ - /usr/bin/dpkg --print-installation-architecture /dev/null 21; then - ARCH=`/usr/bin/dpkg --print-installation-architecture` + /usr/bin/dpkg --print-architecture /dev/null 21; then + ARCH=`/usr/bin/dpkg --print-architecture` elif type udpkg /dev/null 21 \ udpkg --print-architecture /dev/null 21; then ARCH=`/usr/bin/udpkg --print-architecture` -- System Information: Debian Release: squeeze/sid APT prefers experimental APT policy: (500, 'experimental'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.29-2-amd64 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages debootstrap depends on: ii binutils 2.19.51.20090508-1 The GNU assembler, linker and bina ii wget 1.11.4-2 retrieves files from the web Versions of packages debootstrap recommends: ii gnupg 1.4.9-4GNU privacy guard - a free PGP rep debootstrap suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#531680: debootstrap: Should not use obsolete dpkg --print-installation-architecture
Hello Felix, On Wed, Jun 3, 2009 at 6:13 AM, Felix Zielcke fziel...@z-51.de wrote: The new dpkg in sid warns now that --print-installation-architecture is obsolete: fz:~# debootstrap sid chroot http://ftp.de.debian.org/debian dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. This patch solves it. What people thinks about the alternative patch attached? -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br Index: debootstrap === --- debootstrap (revisão 58649) +++ debootstrap (cópia de trabalho) @@ -332,18 +332,20 @@ ### -if [ $ARCH != ]; then - true -elif [ -x /usr/bin/dpkg ] \ - /usr/bin/dpkg --print-installation-architecture /dev/null 21; then - ARCH=`/usr/bin/dpkg --print-installation-architecture` -elif type udpkg /dev/null 21 \ - udpkg --print-architecture /dev/null 21; then - ARCH=`/usr/bin/udpkg --print-architecture` -elif [ -e $DEBOOTSTRAP_DIR/arch ]; then - ARCH=`cat $DEBOOTSTRAP_DIR/arch` -else - error 1 WHATARCH Couldn't work out current architecture +if [ -z $ARCH ]; then + if [ -x /usr/bin/dpkg ]; then + DPKG=/usr/bin/dpkg + elif type udpkg /dev/null 21; then + DPKG=udpkg + fi + + if [ -n $DPKG] $DPKG --print-architecture /dev/null 21; then + ARCH=`$DPKG --print-architecture` + elif [ -e $DEBOOTSTRAP_DIR/arch ]; then + ARCH=`cat $DEBOOTSTRAP_DIR/arch` + else + error 1 WHATARCH Couldn't work out current architecture + fi fi export ARCH SUITE TARGET
Bug#531680: debootstrap: Should not use obsolete dpkg --print-installation-architecture
Hello, On Wed, Jun 3, 2009 at 2:24 PM, Otavio Salvador ota...@ossystems.com.br wrote: Hello Felix, On Wed, Jun 3, 2009 at 6:13 AM, Felix Zielcke fziel...@z-51.de wrote: The new dpkg in sid warns now that --print-installation-architecture is obsolete: fz:~# debootstrap sid chroot http://ftp.de.debian.org/debian dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead. This patch solves it. What people thinks about the alternative patch attached? I fixed a minor issue with the patch and it works for me now. Please use this version when reviewing. -- Otavio Salvador O.S. Systems E-mail: ota...@ossystems.com.br http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br Index: debian/changelog === --- debian/changelog (revisão 58649) +++ debian/changelog (cópia de trabalho) @@ -1,3 +1,11 @@ +debootstrap (1.0.14) UNRELEASED; urgency=low + + * Use dpkg --print-architecture to avoid deprecation warning. Thanks +to Felix Zielcke fziel...@z-51.de for the first version of the +patch. Closes: #531680. + + -- Otavio Salvador ota...@ossystems.com.br Wed, 03 Jun 2009 14:26:22 -0300 + debootstrap (1.0.13) unstable; urgency=low [ Otavio Salvador ] Index: debootstrap === --- debootstrap (revisão 58649) +++ debootstrap (cópia de trabalho) @@ -332,18 +332,20 @@ ### -if [ $ARCH != ]; then - true -elif [ -x /usr/bin/dpkg ] \ - /usr/bin/dpkg --print-installation-architecture /dev/null 21; then - ARCH=`/usr/bin/dpkg --print-installation-architecture` -elif type udpkg /dev/null 21 \ - udpkg --print-architecture /dev/null 21; then - ARCH=`/usr/bin/udpkg --print-architecture` -elif [ -e $DEBOOTSTRAP_DIR/arch ]; then - ARCH=`cat $DEBOOTSTRAP_DIR/arch` -else - error 1 WHATARCH Couldn't work out current architecture +if [ -z $ARCH ]; then + if [ -x /usr/bin/dpkg ]; then + DPKG=/usr/bin/dpkg + elif type udpkg /dev/null 21; then + DPKG=udpkg + fi + + if [ -n $DPKG ] $DPKG --print-architecture /dev/null 21; then + ARCH=`$DPKG --print-architecture` + elif [ -e $DEBOOTSTRAP_DIR/arch ]; then + ARCH=`cat $DEBOOTSTRAP_DIR/arch` + else + error 1 WHATARCH Couldn't work out current architecture + fi fi export ARCH SUITE TARGET