Bug#685924: live-build: apt-preferences deconfigure broken [PATCH]
Package: live-build
Version: 3.0~a57-1
Severity: important
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
deconfigure of preferences and preferences.d that comes from
config/chroot_apt/ doesn't seems to do the correct work, this patch
includes the fix for the deconfiguring process
- -- Package-specific info:
- -- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages live-build depends on:
ii debootstrap 1.0.42
Versions of packages live-build recommends:
ii cpio 2.11-8
ii gnu-fdisk 1.2.4-3.1
ii live-boot-doc 3.0~a35-1
ii live-config-doc 3.0~a33-1
ii live-manual-html [live-manual] 1:3.0~a13-1
Versions of packages live-build suggests:
ii dosfstools 3.0.13-1
ii fakeroot 1.18.4-2
ii genisoimage 9:1.1.11-2
ii git 1:1.7.10.4-1
ii memtest86+ 4.20-1.1
ii mtools 4.0.17-1
pn parted <none>
ii squashfs-tools 1:4.2-5
ii sudo 1.8.5p2-1
pn syslinux | grub <none>
pn uuid-runtime <none>
pn win32-loader <none>
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAEBCAAGBQJQOjA+AAoJEKLHmb/f+NfCbBgP/3TOMefpjHczYeUWGJNGyJqQ
YrnMF76GzTdUr6QqYH0IEi4Cx+cAI7k77zPauJApuvrWO4sk89UxyzO+2HhnYxKo
ObBkjrjBEv0XG554KewSfjJW9j1lLr9GOsBxH2Y+X9bfml5IK7wVqduMoacY0L7m
ui8UN/c5tVfTmdcNCyCFo2gOiJ1FkzLm9TBKljgmrcm3ryGwfFBx5AAe5pgcDw9e
U7+I7JxWcdhrb+NRFSXgQaqOmeaGBp/c3RjIYdqhiNEVznpn+vZL+hLKorqPhsiE
Hz+BREOpucprUupo9nYwaiqcwTAZ40EEpA5ttr04/u+/eu8x5Jz2FvEs016fLRXk
eyVMxrHOf7tlwR3qiBJ+dc2OGs7f6I8UD0e3XBsiF98myVeEYhMy+EuAFE7+3GKW
NwTwiD/4vaQgzRrVu3bmrxzVAt4IwRpa9PgwA07j8dS8YwdbMX0nZANzAN5oCXo7
floahUbS/coTIksaoE3law1j8y4eSXWnrh/4MSYVB/p7/8Sn6ez1qPzK0YcQJJD0
34lJrmAIIPW5+kciSrTwA8VEqlQFy67ZBjVpaKEK1hD9KsNykj/G9bMFAIfrQ09Z
zd+ihqnoc8dz7GKaB8ztVdwRaPX6ek7CtP1UTsbhthMiWIqndC3SmtZg52nFewbY
dXRRQN2jXoMmPMB8L9Mr
=lVZ2
-----END PGP SIGNATURE-----
--- a/scripts/build/lb_chroot_apt
+++ b/scripts/build/lb_chroot_apt
@@ -108,6 +108,7 @@ case "${1}" in
cp config/chroot_apt/preferences chroot/etc/apt/preferences
fi
+ # Configuring apt preferences.d
if Find_files config/chroot_apt/*.pref
then
for _FILE in config/chroot_apt/*.pref
@@ -255,16 +256,9 @@ EOF
rm -f chroot/etc/apt/apt.conf.d/00secure
fi
- # Configuring apt config
+ # Deconfiguring apt config
if [ -f config/chroot_apt/apt.conf ]
then
- if [ -f chroot/etc/apt/apt.conf ]
- then
- mv chroot/etc/apt/apt.conf chroot/etc/apt/apt.conf.orig
- fi
-
- cp config/chroot_apt/apt.conf chroot/etc/apt/apt.conf
-
if [ -f chroot/etc/apt/apt.conf.orig ]
then
mv chroot/etc/apt/apt.conf.orig chroot/etc/apt/apt.conf
@@ -274,31 +268,18 @@ EOF
# Deconfiguring apt preferences
if [ -f config/chroot_apt/preferences ]
then
- if [ -f chroot/etc/apt/preferences ]
- then
- mv chroot/etc/apt/preferences chroot/etc/apt/preferences.orig
- fi
-
- cp config/chroot_apt/preferences chroot/etc/apt/preferences
-
if [ -f chroot/etc/apt/preferences.orig ]
then
mv chroot/etc/apt/preferences.orig chroot/etc/apt/preferences
fi
fi
+ # Deconfiguring apt preferences.d
if Find_files config/chroot_apt/*.pref
then
for _FILE in config/chroot_apt/*.pref
do
- if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
- then
- mv chroot/etc/apt/preferences.d/$(basename ${_FILE}) chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig
- fi
-
- cp -aL ${_FILE} chroot/etc/apt/preferences.d
-
- if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
+ if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig ]
then
mv chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig chroot/etc/apt/preferences.d/$(basename ${_FILE})
fi
Reply to: