Hi Kees (2010.04.05_21:31:10_+0200) > In addition to the patches waiting in bug 455082, here > is a patch to add a "--skip-installer" option to skip d-i > files for specific dists (this is very handy for Ubuntu).
This is mostly superseded by a largely identical patch from bug #636627. All that remains is the --skip-installer option. Updated patch attached. SR -- Stefano Rivera http://tumbleweed.org.za/ H: +27 21 465 6908 C: +27 72 419 8559 UCT: x3127
Description: allow releases to be skipped when fetching installer files. Author: Jamie Strandboge <ja...@ubuntu.com>, Kees Cook <k...@ubuntu.com> Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576576 --- a/debmirror +++ b/debmirror @@ -85,6 +85,10 @@ F<./.temp> working directory, but won't replace the old meta files, won't download debs and source files and only simulates cleanup. +=item B<--skip-installer>=I<foo[,bar,..]> + +Don't download debian-installer files for the specified distribution. + =item B<--help> Display a usage summary. @@ -537,7 +541,7 @@ our $mirrordir; our ($debug, $progress, $verbose, $passive, $skippackages, $getcontents, $i18n); our ($ua, $proxy, $ftp); -our (@dists, @sections, @arches, @ignores, @excludes, @includes); +our (@dists, @sections, @arches, @ignores, @excludes, @includes, @skip_installer); our (@excludes_deb_section, @limit_priority); our (@di_dists, @di_arches, @rsync_extra); our $state_cache_days = 0; @@ -650,6 +654,7 @@ 'postcleanup' => \$post_cleanup, 'nocleanup' => \$no_cleanup, 'ignore=s' => \@ignores, + 'skip-installer=s' => \@skip_installer, 'exclude=s' => \@excludes, 'exclude-deb-section=s' => \@excludes_deb_section, 'limit-priority=s' => \@limit_priority, @@ -738,6 +743,8 @@ $post_cleanup=0 if ($no_cleanup); $post_cleanup=0 if ($pre_cleanup); $post_cleanup=0 if ($debmarshal); +@skip_installer=split(/,/,join(',',@skip_installer)); +@skip_installer=() unless @skip_installer; # Display configuration. $|=1 if $debug; @@ -2415,11 +2422,16 @@ di_cleanup() if @di_dists; } +# Figure out whether debian-installer should be skipped for a given dist. +my %skip_installer=("woody" => 1, "experimental" => 1); +foreach my $skipped_dist (@skip_installer) { + $skip_installer{$skipped_dist} = 1; +} + sub di_skip_dist { my $dist=shift; - if ( $dist eq "woody" || - $dist eq "experimental" || - $dist =~ /.*-updates/ ) { + if ( $dist =~ /.*-updates/ || + defined($skip_installer{$dist}) ) { return 1; } return 0;