summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2014-12-30 13:40:50 (GMT)
committerCyril Brulebois <kibi@debian.org>2014-12-30 13:40:50 (GMT)
commit183eaa304570330f1f76f6f5ffbbb3371582aec7 (patch)
tree68fe52a584b50cf8414e9846f20cebab33f5055c /functions
parent99f4a6062255b3622afc810fd6d69a51bfe2eda1 (diff)
downloaddebootstrap-183eaa304570330f1f76f6f5ffbbb3371582aec7.zip
debootstrap-183eaa304570330f1f76f6f5ffbbb3371582aec7.tar.gz
debootstrap-183eaa304570330f1f76f6f5ffbbb3371582aec7.tar.bz2
Fix the empty sources.list bug with foreign architectures (Closes: #732255, #773867).
Update setup_apt_sources to look at USE_COMPONENTS if COMPONENTS is empty, so that some iteration over defined components happens.
Diffstat (limited to 'functions')
-rw-r--r--functions4
1 files changed, 3 insertions, 1 deletions
diff --git a/functions b/functions
index 674d649..bf999f1 100644
--- a/functions
+++ b/functions
@@ -949,9 +949,11 @@ mv_invalid_to () {
setup_apt_sources () {
mkdir -p "$TARGET/etc/apt"
+ # Cope with the foreign case where COMPONENTS would be empty:
+ sources_components="${COMPONENTS:-$USE_COMPONENTS}"
for m in "$@"; do
local cs=""
- for c in $COMPONENTS; do
+ for c in $sources_components; do
local path="dists/$SUITE/$c/binary-$ARCH/Packages"
local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")"
if [ -e "$pkgdest" ]; then cs="$cs $c"; fi