summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-09-30 15:26:34 +0200
committerDaniel Baumann <daniel@debian.org>2011-09-30 15:26:34 +0200
commitcf4f1c8acef06bce4b026e6b7be255fe44401b59 (patch)
tree11ef69fd9816fc5e785f05f1bb2ebf865fa4d5de
parentd59ecb4ae205234f91f823872aa219f91395c01d (diff)
downloadvyos-live-build-cf4f1c8acef06bce4b026e6b7be255fe44401b59.tar.gz
vyos-live-build-cf4f1c8acef06bce4b026e6b7be255fe44401b59.zip
Treating sources.list top-level file specially to workaround bug in apt that makes sources.list.d sources to be never prefered over main sources.list when using pinning (Closes: #573054).
-rwxr-xr-xscripts/build/lb_chroot_archives6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives
index a8b3b6aea..200b20da7 100755
--- a/scripts/build/lb_chroot_archives
+++ b/scripts/build/lb_chroot_archives
@@ -431,6 +431,9 @@ EOF
# Add to sources.list.d
echo "deb file:/root/packages ./" > chroot/etc/apt/sources.list.d/packages.list
+ # Move top-level sources away, otherwise apt always preferes it, even for local packages
+ mv chroot/etc/apt/sources.list chroot/etc/apt/sources.list.d/zz-sources.list
+
# Removing depends
Remove_package
else
@@ -589,6 +592,9 @@ EOF
# Creating lock file
Create_lockfile .lock
+ # Restore top-level sources
+ mv chroot/etc/apt/sources.list.d/zz-sources.list chroot/etc/apt/sources.list
+
# Configure generic indices
# Don't do anything if it's not required
if [ "${LB_PARENT_MIRROR_CHROOT}" = "${LB_PARENT_MIRROR_BINARY}" ] && \