Selectively remove chroot-only APT configuration and preferences instead of wiping everything.

This commit is contained in:
Jan Blunck 2013-09-18 10:48:21 +02:00
parent 4d9c77d20e
commit ddb8ad5dae
1 changed files with 18 additions and 4 deletions

View File

@ -673,10 +673,6 @@ EOF
fi
fi
# probably too bold, needs refinment (FIXME)
rm -f chroot/etc/apt/conf.d/*
rm -f chroot/etc/apt/preferences.d/*
# Removing chroot-only apt sources
for FILE in config/archives/*.list.chroot
do
@ -686,6 +682,24 @@ EOF
fi
done
# Removing chroot-only apt configuration
for FILE in config/archives/*.conf.chroot
do
if [ -e "${FILE}" ]
then
rm -f "chroot/etc/apt/conf.d/$(basename ${FILE} .chroot)"
fi
done
# Removing chroot-only apt preferences
for FILE in config/archives/*.pref.chroot
do
if [ -e "${FILE}" ]
then
rm -f "chroot/etc/apt/preferences.d/$(basename ${FILE} .chroot)"
fi
done
# Adding local apt sources (binary)
for FILE in config/archives/*.list config/archives/*.list.binary
do