[SCM] live-helper branch, debian-next, updated. debian/2.0_a9-1-17-g9228b0d
Daniel Baumann
daniel at debian.org
Fri Apr 9 19:32:19 UTC 2010
The following commit has been merged in the debian-next branch:
commit 9228b0d5978183ea5ece65864b27a47b7c9ce048
Author: Daniel Baumann <daniel at debian.org>
Date: Fri Apr 9 21:12:14 2010 +0200
Adding --repositories, part 7.
diff --git a/helpers/chroot_sources b/helpers/chroot_sources
index dc13ada..d30ac73 100755
--- a/helpers/chroot_sources
+++ b/helpers/chroot_sources
@@ -125,32 +125,42 @@ case "${1}" in
then
for REPOSITORY in ${LH_REPOSITORIES}
do
- # Adding sources.list entries (chroot)
- if [ -e "${LH_BASE}/repositories/${REPOSITORY}.chroot" ]
- then
- sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
- -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
- "${LH_BASE}/repositories/${REPOSITORY}.chroot" > \
- "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
- elif [ -e "${LH_BASE}/repositories/${REPOSITORY}" ]
- then
- sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
- -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
- "${LH_BASE}/repositories/${REPOSITORY}" > \
- "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
- fi
+ for PLACE in config/repositories "${LH_BASE}/repositories"
+ do
+ # Prefer repositories from the config tree
+ # over the global ones.
+ if ! ls "${PLACE}/${REPOSITORY}"* > /dev/null 2>&1
+ then
+ continue
+ fi
- if [ "${LH_APT_SECURE}" != false ]
- then
- # Adding archive signing keys (chroot)
- if [ -e "${LH_BASE}/repositories/${REPOSITORY}.chroot.gpg" ]
+ # Adding sources.list entries (chroot)
+ if [ -e "${PLACE}/${REPOSITORY}.chroot" ]
then
- cat "${LH_BASE}/repositories/${REPOSITORY}.chroot.gpg" | Chroot "apt-key add -"
- elif [ -e "${LH_BASE}/repositories/${REPOSITORY}.gpg" ]
+ sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
+ -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
+ "${PLACE}/${REPOSITORY}.chroot" > \
+ "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
+ elif [ -e "${PLACE}/${REPOSITORY}" ]
then
- cat "${LH_BASE}/repositories/${REPOSITORY}.gpg" | Chroot "apt-key add -"
+ sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
+ -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
+ "${PLACE}/${REPOSITORY}" > \
+ "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
fi
- fi
+
+ if [ "${LH_APT_SECURE}" != false ]
+ then
+ # Adding archive signing keys (chroot)
+ if [ -e "${PLACE}/${REPOSITORY}.chroot.gpg" ]
+ then
+ cat "${PLACE}/${REPOSITORY}.chroot.gpg" | Chroot chroot "apt-key add -"
+ elif [ -e "${PLACE}/${REPOSITORY}.gpg" ]
+ then
+ cat "${PLACE}/${REPOSITORY}.gpg" | Chroot chroot "apt-key add -"
+ fi
+ fi
+ done
done
fi
@@ -495,32 +505,42 @@ case "${1}" in
# Removing sources.list entries (chroot)
rm -f "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
- # Adding sources.list entries (binary)
- if [ -e "${LH_BASE}/repositories/${REPOSITORY}.binary" ]
- then
- sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
- -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
- "${LH_BASE}/repositories/${REPOSITORY}.binary" > \
- "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
- elif [ -e "${LH_BASE}/repositories/${REPOSITORY}" ]
- then
- sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
- -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
- "${LH_BASE}/repositories/${REPOSITORY}" > \
- "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
- fi
+ for PLACE in config/repositories "${LH_BASE}/repositories"
+ do
+ # Prefer repositories from the config tree
+ # over the global ones.
+ if ! ls "${PLACE}/${REPOSITORY}"* > /dev/null 2>&1
+ then
+ continue
+ fi
- if [ "${LH_APT_SECURE}" != false ]
- then
- # Adding archive signing keys (binary)
- if [ -e "${LH_BASE}/repositories/${REPOSITORY}.binary.gpg" ]
+ # Adding sources.list entries (binary)
+ if [ -e "${PLACE}/${REPOSITORY}.binary" ]
then
- cat "${LH_BASE}/repositories/${REPOSITORY}.binary.gpg" | Chroot "apt-key add -"
- elif [ -e "${LH_BASE}/repositories/${REPOSITORY}.gpg" ]
+ sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
+ -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
+ "${PLACE}/${REPOSITORY}.binary" > \
+ "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
+ elif [ -e "${PLACE}/${REPOSITORY}" ]
then
- cat "${LH_BASE}/repositories/${REPOSITORY}.gpg" | Chroot "apt-key add -"
+ sed -e "s|@DISTRIBUTION@|${LH_DISTRIBUTION}|g" \
+ -e "s|@ARCHIVE_AREAS@|${LH_ARCHIVE_AREAS}|g" \
+ "${PLACE}/${REPOSITORY}" > \
+ "chroot/etc/apt/sources.list.d/${REPOSITORY}.list"
fi
- fi
+
+ if [ "${LH_APT_SECURE}" != false ]
+ then
+ # Adding archive signing keys (binary)
+ if [ -e "${PLACE}/${REPOSITORY}.binary.gpg" ]
+ then
+ cat "${PLACE}/${REPOSITORY}.binary.gpg" | Chroot chroot "apt-key add -"
+ elif [ -e "${PLACE}/${REPOSITORY}.gpg" ]
+ then
+ cat "${PLACE}/${REPOSITORY}.gpg" | Chroot chroot "apt-key add -"
+ fi
+ fi
+ done
done
fi
--
live-helper
More information about the debian-live-changes
mailing list