2011/8/5 Joey Hess <[email protected]>:
> Stefan Kisdaroczi wrote:
>> related to #619146:
>>
>> I changed the command line from
>> --dist=squeeze,squeeze-updates --di-dist=squeeze
>> to
>> --dist=squeeze,squeeze-updates --di-dist=dists
>> and debmirror tried to mirror d-i images for squeeze-updates.
>>
>> The attached patch skips d-i images for suites without d-i.
>
> It seems that the fix for #619146 must have been put into a too late
> place in the code. But with your patch, there are now two separate peices
> of code that try to detect and skip suites that do not have d-i (the
> other being around line 982), so a way needs to be found to unify those.
I did that in the better patch i sent later to [email protected].
Attached again or see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636627
Stefan
diff --git a/debmirror b/debmirror
index 73c52ae..0c41a1d 100755
--- a/debmirror
+++ b/debmirror
@@ -979,10 +979,7 @@ foreach my $dist (keys %distset) {
next unless exists $distset{$dist}{mirror};
foreach my $section (@sections) {
# some suites don't have d-i
- next if ($section =~ /debian-installer/ && $dist eq "woody");
- next if ($section =~ /debian-installer/ && $dist eq "experimental");
- # *-proposed-updates, squeeze-updates, etc all partial suites, all lack d-i
- next if ($section =~ /debian-installer/ && $dist =~ /.*-updates/ );
+ next if ($section =~ /debian-installer/ && di_skip_dist($dist) );
foreach my $arch (@arches) {
get_index("dists/$dist/$section/binary-$arch", "Packages");
link_index($dist,$section,$arch) if $debmarshal;
@@ -2425,9 +2422,20 @@ sub cleanup_unknown_files {
di_cleanup() if @di_dists;
}
+sub di_skip_dist {
+ my $dist=shift;
+ if ( $dist eq "woody" ||
+ $dist eq "experimental" ||
+ $dist =~ /.*-updates/ ) {
+ return 1;
+ }
+ return 0;
+}
+
sub di_check_dists {
DI_DIST:
for my $di_dist (@di_dists) {
+ next if di_skip_dist($di_dist);
if (exists $distset{$di_dist}) {
# Valid dist and also mirroring the archive itself
$distset{$di_dist}{"d-i"} = 1;