[SCM] live-helper branch, debian, updated. debian/2.0_a1-1-4-gbfdf4c2
Daniel Baumann
daniel at debian.org
Wed Nov 18 19:06:09 UTC 2009
The following commit has been merged in the debian branch:
commit bfdf4c27062b0481169ed44247cdf24b2a7144d7
Author: Daniel Baumann <daniel at debian.org>
Date: Wed Nov 18 19:43:24 2009 +0100
Using /etc/apt/sources.list.d mechanism for local sources.list snipplets.
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index 31c6124..fc8d193 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -78,12 +78,19 @@ case "${1}" in
# Check local sources.list
if Find_files config/chroot_sources/*.chroot
then
- echo "" >> chroot/etc/apt/sources.list
- echo "# Custom repositories" >> chroot/etc/apt/sources.list
+ # Deconfigure (possibly) old sources.list snipplets
+ if Find_files config/chroot_sources/*.binary
+ then
+ for FILE in config/chroot_sources/*.binary
+ do
+ rm -f "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)"
+ done
+ fi
+ # Configure new sources.list snipplets
for FILE in config/chroot_sources/*.chroot
do
- cat ${FILE} | grep -v "^##" >> chroot/etc/apt/sources.list
+ cp "${FILE}" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
done
fi
@@ -401,12 +408,19 @@ case "${1}" in
# Check local sources.list
if Find_files config/chroot_sources/*.binary
then
- echo "" >> chroot/etc/apt/sources.list
- echo "# Custom repositories" >> chroot/etc/apt/sources.list
+ # Deconfigure (possibly) old sources.list snipplets
+ if Find_files config/chroot_sources/*.chroot
+ then
+ for FILE in config/chroot_sources/*.chroot
+ do
+ rm -f "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
+ done
+ fi
+ # Configure new sources.list snipplets
for FILE in config/chroot_sources/*.binary
do
- cat ${FILE} | grep -v "^##" >> chroot/etc/apt/sources.list
+ cp "${FILE}" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)"
done
fi
--
live-helper
More information about the debian-live-changes
mailing list