[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#561283: debootstrap: honor --components when using mirror_style 'main'



Package: debootstrap
Version: 1.0.20
Tags: patch

I have a mirror that requires mirror_style 'main' (because the top-level
Release file lacks an md5sum list for Packages).  However, when using
a mirror_style of 'main', the COMPONENTS list is hardcoded to 'main'.
This is fine if we're not specifying a component list via command
line.  However, if we're passing debootstrap --components=foo,bar,baz,
it should really be attempting to use those components.

This patch updates download_main_indices to respect --components.


--- /usr/share/debootstrap/functions.bak	2009-12-15 16:40:08.000000000 -0500
+++ /usr/share/debootstrap/functions	2009-12-15 16:50:34.000000000 -0500
@@ -649,9 +649,14 @@
 
 download_main_indices () {
 	local m1="${MIRRORS%% *}"
+	local comp="${USE_COMPONENTS}"
 	progress 0 100 DOWNMAINPKGS "Downloading Packages file"
 	progress_next 100
-	COMPONENTS=main
+
+	# if USE_COMPONENTS is empty, just use main
+	[ -z "$comp" ] && comp=main
+	COMPONENTS="$(echo $comp | tr '|' ' ')"
+
 	export COMPONENTS
 	for m in $MIRRORS; do
 	    for c in $COMPONENTS; do



Reply to: