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

On multi-arch enabled system, debian-cd will try to download foreign arch



Hi,

Using simple-cdd [0], I had the issue (briefly) described in this bug report: [1]

I created a patch that fixes this issue. I wrote it against debian-cd v3.1.13, but it applies without problems on SVN trunk.

Antoine Pierlot-Garcin

[0] http://packages.qa.debian.org/s/simple-cdd.html
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687355
diff -purN debian-cd-3.1.13.orig/tools/apt-selection debian-cd-3.1.13/tools/apt-selection
--- debian-cd-3.1.13.orig/tools/apt-selection	2013-05-30 13:37:30.009311740 +0200
+++ debian-cd-3.1.13/tools/apt-selection	2013-05-30 13:38:59.737309120 +0200
@@ -24,7 +24,7 @@ fi
 if [ $ARCH = "source" ] ; then
 	ADEB="deb-src"
 else
-	ADEB="deb"
+	ADEB="deb [arch=$ARCH]"
 fi
 
 options=" -q -o Dir::State::status=$APTTMP/$CODENAME-$ARCH/status \
diff -purN debian-cd-3.1.13.orig/tools/generate_di_list debian-cd-3.1.13/tools/generate_di_list
--- debian-cd-3.1.13.orig/tools/generate_di_list	2013-05-30 13:37:30.001311922 +0200
+++ debian-cd-3.1.13/tools/generate_di_list	2013-05-30 13:38:59.741309132 +0200
@@ -12,8 +12,8 @@ exit 0 if $ENV{ARCHES} =~ /^\s*source\s*
 
 my @ARCHES;
 if ( $ENV{ARCHES} ) {
-    push @ARCHES, 'i386' if $ENV{ARCHES} =~ /[^\s]i386[\s\$]/;
-    push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /[^\s]amd64[\s\$]/;
+    push @ARCHES, 'i386' if $ENV{ARCHES} =~ /\bi386\b/;
+    push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /\bamd64\b/;
     push @ARCHES, grep { !/^(source|i386|amd64)$/ } split /\s+/, $ENV{ARCHES};
 }
 @ARCHES = qw{i386 amd64} unless @ARCHES;
diff -purN debian-cd-3.1.13.orig/tools/which_deb debian-cd-3.1.13/tools/which_deb
--- debian-cd-3.1.13.orig/tools/which_deb	2013-05-30 13:37:30.009311740 +0200
+++ debian-cd-3.1.13/tools/which_deb	2013-05-30 13:38:59.745309122 +0200
@@ -29,8 +29,8 @@ if (!defined ($output)) {
 # Give preference to i386 and amd64, if specified
 my @ARCHES;
 if ( $ENV{ARCHES} ) {
-    push @ARCHES, 'i386' if $ENV{ARCHES} =~ /i386/;
-    push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /amd64/;
+    push @ARCHES, 'i386' if $ENV{ARCHES} =~ /\bi386\b/;
+    push @ARCHES, 'amd64' if $ENV{ARCHES} =~ /\bamd64\b/;
     push @ARCHES, grep { !/source|i386|amd64/ } split /\s+/, $ENV{ARCHES};
 }
 

Reply to: