Remove chroot-only configured apt sources in chroot_archives remove.
authorJan Blunck <jblunck@vyatta.com>
Tue, 17 Sep 2013 11:28:00 +0000 (13:28 +0200)
committerJan Blunck <jblunck@vyatta.com>
Wed, 18 Sep 2013 08:36:31 +0000 (10:36 +0200)
If an archive is configured with *.chroot extension remove it when
deconfiguring chroot/etc/apt/sources.list.d directory.

scripts/build/chroot_archives

index 95b47c3..226bad6 100755 (executable)
@@ -677,6 +677,15 @@ EOF
                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
+                       if [ -e "${FILE}" ]
+                       then
+                               rm -f "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
+                       fi
+               done
+
                # Adding local apt sources (binary)
                for FILE in config/archives/*.list config/archives/*.list.binary
                do