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

Bug#879130: marked as done (empty mirror list on non released architectures)



Your message dated Wed, 27 Nov 2019 12:49:06 +0000
with message-id <E1iZwkk-0001qh-7y@fasolo.debian.org>
and subject line Bug#879130: fixed in choose-mirror 2.101
has caused the Debian Bug report #879130,
regarding empty mirror list on non released architectures
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
879130: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879130
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: choose-mirror
Version: 2.82
Severity: whishlist
Tags: patch
X-Debbugs-CC: "Helge Deller" <deller@gmx.de>, "John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>, "James Clarke" <jrtc27@debian.org>

Dear Maintainer,

The following is a reformulation of a previous bug
report by Helge Deller [1].

The mirror list for non released architectures is empty -
"manual selection" is the only choice available.

The patch below make use of the 'Ports-architecture' fields
in the mirror masterlist to create a non empty mirror list.
A file 'port_architecture' is created on non released architectures
for the use of other packages.

Regards,
JH Chatenet

[1] : http://lists.debian.org/debian-boot/2017/05/msg00029.html

--- a/Makefile
+++ b/Makefile
@@ -79,6 +79,7 @@
 
 debian/httplist-countries: $(MASTERLIST) debian/iso_3166.tab
 	./mirrorlist httplist $^
+	# As a side effect, a file 'port_architecture' is created on non released architectures
 
 debian/httpslist-countries: $(MASTERLIST) debian/iso_3166.tab
 	./mirrorlist httpslist $^
--- a/debian/clean
+++ b/debian/clean
@@ -1 +1,2 @@
 debian/choose-mirror-bin.templates
+port_architecture
--- a/debian/rules
+++ b/debian/rules
@@ -26,3 +26,10 @@
 	./sort-templates
 	# Make sure templates are not obviously broken (#834383):
 	[ ! -d debian/choose-mirror-bin/DEBIAN ] || grep -qs '^Template:' debian/choose-mirror-bin/DEBIAN/templates
+
+override_dh_auto_install:
+	dh_auto_install
+	# Expose the file 'port_architecture' for the use of other packages
+ifneq (,$(filter choose-mirror-bin, $(shell dh_listpackages)))
+	if test -e port_architecture; then install -D -m 0644 port_architecture debian/choose-mirror-bin/usr/lib/choose-mirror/port_architecture; fi
+endif
--- a/mirrorlist
+++ b/mirrorlist
@@ -104,12 +104,35 @@
 	$data[$id]->{rating}=$rating;
 }
 
+# Defaults for released architectures
+my $archive_archlist = 'archive-architecture';
+my $archive_type = "archive-$type";
+
+# Is $hostarch a port architecture ? 
+# Such architectures appear in a Ports-architecture: field
+# As an exception, deb.debian.org carries port architectures but has no Ports-architecture: field
+foreach my $id (0..$#data) {
+	if (exists $data[$id]->{'ports-architecture'} &&
+	    $data[$id]->{'ports-architecture'} ne "any") {
+		my @arches = split ' ', $data[$id]->{'ports-architecture'};
+		my %arches = map { $_ => 1 } @arches;
+		if (exists $arches{$hostarch} or exists $arches{'!'.$hostarch}) {
+			$archive_archlist = 'ports-architecture';
+			$archive_type = "ports-$type";
+			open(PORTARCHITECTURE,"> port_architecture") || die "Unable to write port_architecture\n";
+			print PORTARCHITECTURE "1";
+			close PORTARCHITECTURE;
+			last;
+		}
+	}	
+}
+
 # Filter out mirrors that don't carry the target architecture.
 my @newdata;
 foreach my $id (0..$#data) {
-	if (exists $data[$id]->{'archive-architecture'} &&
-	    $data[$id]->{'archive-architecture'} ne "any") {
-		my @arches = split ' ', $data[$id]->{'archive-architecture'};
+	if (exists $data[$id]->{$archive_archlist} &&
+	    $data[$id]->{$archive_archlist} ne "any") {
+		my @arches = split ' ', $data[$id]->{$archive_archlist};
 		if (grep /^!/, @arches) {
 			my %notarches = map { substr($_, 1) => 1 } grep /^!/, @arches;
 			next if exists $notarches{$hostarch};
@@ -124,9 +147,11 @@
 
 if ($type =~ /(.*)list/) {
 	my $type=$1;
+	$archive_type =~ s/list$//;
+
  	open (LIST, ">debian/${type}list-countries") or die "debian/${type}list-countries: $!";
 	foreach my $id (0..$#data) {
-		next unless exists $data[$id]->{"archive-$type"} and
+		next unless exists $data[$id]->{$archive_type} and
 		                    exists $data[$id]->{country};
 		my $cc = $data[$id]->{country};
 		die "Error: country code '$cc' does not occur in iso-3166 table"
@@ -154,13 +179,13 @@
 		else {
 			$cc=$q.$data[$id]->{country}.$q;
 		}
-		next unless exists $data[$id]->{"archive-$type"} and defined $cc;
-		if (! exists $data[$id]->{'archive-architecture'}) {
-			print STDERR "warning: missing archive-architecture for mirror ".$data[$id]->{site}."; assuming it contains all architectures.\n";
+		next unless exists $data[$id]->{$archive_type} and defined $cc;
+		if (! exists $data[$id]->{$archive_archlist}) {
+			print STDERR "warning: missing (archive|ports)-architecture for mirror ".$data[$id]->{site}."; assuming it contains all architectures.\n";
 		}
 		print OUT "\t{",
 			  join(", ", $q.$data[$id]->{site}.$q, $cc,
-				$q.$data[$id]->{"archive-$type"}.$q),
+				$q.$data[$id]->{$archive_type}.$q),
 			  "},\n";
 	}
 	print OUT "\t{NULL, NULL, NULL}\n";

--- End Message ---
--- Begin Message ---
Source: choose-mirror
Source-Version: 2.101

We believe that the bug you reported is fixed in the latest version of
choose-mirror, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 879130@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Cyril Brulebois <kibi@debian.org> (supplier of updated choose-mirror package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 27 Nov 2019 12:33:18 +0100
Source: choose-mirror
Architecture: source
Version: 2.101
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Cyril Brulebois <kibi@debian.org>
Closes: 879130
Changes:
 choose-mirror (2.101) unstable; urgency=medium
 .
   [ Samuel Thibault ]
   * Update Mirrors.masterlist.
   * mirrorlist: Make ports architectures use the Ports field. Note that an
     architecture is a port in usr/lib/choose-mirror/port_architecture
     (Closes: Bug#879130).
   * mktemplates: Make ports architectures default to debian-ports/ mirror
     directory.
Checksums-Sha1:
 d4ca0f2ec713d8a8f0fc28d27f4a6575ad9d84f4 1831 choose-mirror_2.101.dsc
 234cc90f354def1102c97a8cdd7328c63e3a0ece 187472 choose-mirror_2.101.tar.xz
 e4acf821c83889b41c91a9eed05b105719fa5d24 6975 choose-mirror_2.101_source.buildinfo
Checksums-Sha256:
 30df34933122c12c91395d435c3444ae5effbe7cfe991b7ad05d43e124463f7c 1831 choose-mirror_2.101.dsc
 fcdcaabaf89d5c7b44bce260df2b93f088af6787ec66b7618f648e7f86583b3b 187472 choose-mirror_2.101.tar.xz
 dda4f938d70b7866537195c34254c714b0b6b4eb6680460bd700b9ca0a34c737 6975 choose-mirror_2.101_source.buildinfo
Files:
 32efefa816983e65f8ff4d72a4dffaa2 1831 debian-installer optional choose-mirror_2.101.dsc
 d337cb2e05fc1d925812d5ff2fa07856 187472 debian-installer optional choose-mirror_2.101.tar.xz
 658fc3456360240b3adddf6e8827db9f 6975 debian-installer optional choose-mirror_2.101_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEtg6/KYRFPHDXTPR4/5FK8MKzVSAFAl3ebA8ACgkQ/5FK8MKz
VSDN/Q//YXmsT/lZHlLf829YTZMykokizl+j3ClzRVOqA6SsyEfMz3INSUwDCiT7
mazhVJMfvS+J0Mz53J4jw8Pr8VmxxxVuQFpsI03J0KOi57lYFFJo4ZIamKe4HFS5
oKhRRHuWj9Wj2uzt1pCeC8tN7kaLJ/YdEhjfQ9iFcTb6T3xfhRIJBP4gzxdLY1qA
hTG4Ma07RRh2CBp+pxadjmn6kJZuHTlLoOh/fI8MNCcfHpT9HuSgmGVTF1JsLBgp
Tk+6EVxwJ8p4UHbL+KB04OFPDCycCpU5cv1gCZXRnWMm4mvQCkiK/uDzG9x6e567
0j0601TTKJHSqORh5XZ7qoRepxP/agUdZrQwyiFwXZITJ+9589HQZ7Yr5DI8FNB5
gROfq+hFne1QukUsoxusErIBLq6IyIL97nFNOghmSBnT391Q39ICDd5xm82gLvYx
UUCeymhwbycjCI571Mn8L6DdmnDs9gBssZOggu4GtLcBekii299pkA1z5CAv+6cC
oa2IaL6li7apuO/miBvPw/ueS2QM5Ri6oMFm21pe1KWEISnM0Iv6svFrmyy+SvUn
iDIAuyE2XgRPay7ESkMg4saArWVaEjT7GLejB9gDjh7XnBxkyKpqdAYtxXvu2zR1
37Ol72eThmWNB8Y90xUPuD5GdxprhYTN5fOVcNDLHJ8SWdtRmCo=
=TFiW
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: