Package: debmirror Version: 20051209 Severity: wishlist Tags: patch I used debmirror to get full mirror for selected architectures. Recently amd64 for >etch became available from the main repository. If I add amd64 to the list of architectures debmirror fails to complete since there is no amd64 port for sarge and woody available. If I would run two debmirrors sequentially, due to cleaning process next one would remove what is not "specified" to be downloaded, ie older distributions, thus it is not a solution. (no-cleaning is also not an option). That is why I've tuned debmirror a bit to allow exclusion of a list of distributions for any given arhicture. So now my call looks like:
debmirror /share/debmirror/debian -e rsync --passive -h debian.csail.mit.edu -r :debian -d etch,etch-proposed-updates,sid,sarge,sarge-proposed-updates,woody,woody-proposed-updates -d experimental -s main,contrib,non-free,main/debian-installer --getcontents -a 'i386,sparc,ia64,powerpc,amd64(-sarge:sarge-proposed-updates:woody:woody-proposed-updates)' --passive --exclude='disks-*' --ignore=rumba --ignore-missing-release --ignore-small-errors In the list of architectures I have amd64(-sarge:sarge-proposed-updates:woody:woody-proposed-updates), which states to don't get those dists for amd64. May be I've done all my work for nothing and there is a proper clean way already... Also I am not a perl programmer, thus my patch can be far from being well written. Please let me know if debmirror can natively do what I need. I will attach the patch (but emacs can screw it up) so I am making it available online as well: http://www.onerussian.com/Linux/patches/debmirror.excludedists.patch -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: ia64 Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-vserver Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R) Versions of packages debmirror depends on: ii bzip2 1.0.3-2 high-quality block-sorting file co ii libcompress-zlib-perl 1.41-1 Perl module for creation and manip ii liblockfile-simple-perl 0.2.5-7 Simple advisory file locking ii libnet-perl 1:1.19-3 Implementation of Internet protoco ii libwww-perl 5.803-4 WWW client/server library for Perl ii perl [libdigest-md5-perl] 5.8.7-10 Larry Wall's Practical Extraction ii perl-modules [libnet-perl] 5.8.7-10 Core Perl modules ii rsync 2.6.6-1 fast remote file copy program (lik Versions of packages debmirror recommends: ii gnupg 1.4.2-2 GNU privacy guard - a free PGP rep -- no debconf information --Yarik ===File /share/debmirror/debmirror.excludedists.patch======= --- /usr/bin/debmirror 2005-12-09 13:52:36.000000000 -0500 +++ debmirror/debmirror 2006-05-26 17:10:52.000000000 -0400 @@ -468,6 +468,26 @@ say("Download at most $rsync_batch files per rsync call.") if ($download_method eq "rsync"); say("Dry run.") if $dry_run_var; +# yoh: Convert @arches into @darches which would contain architectures +# for each distribution, so amd64 which is not present in <= sarge +# could be avoided +my %darches=(); +my @[EMAIL PROTECTED]; [EMAIL PROTECTED](); +foreach my $arch (@dirtyarches) { + my %remove_dists=("none",1); + if ($arch=~/(.*)\(-(.*)\)/) { + $arch=$1; + %remove_dists=map { $_ => 1} (split(/:/,$2)); + } + push(@arches, $arch); + foreach my $dist (@dists) { + $darches{$dist}{$arch}=1 if (!$remove_dists{$dist}); + } + say("Arch $arch: excluding ".join(",", keys %remove_dists)); +} +say("Arches cleanded: ".join(",", @arches)); + my $md5; $md5=Digest::MD5->new; @@ -629,7 +649,7 @@ next if ($section =~ /debian-installer/ && $dist eq "woody"); next if ($section =~ /debian-installer/ && $dist eq "experimental"); next if ($section =~ /debian-installer/ && $dist =~ /.*-proposed-updates/); - foreach my $arch (@arches) { + foreach my $arch (keys %{$darches{$dist}}) { add_bytes("dists/$dist/$section/binary-$arch/Packages"); add_bytes("dists/$dist/$section/binary-$arch/Packages.gz"); add_bytes("dists/$dist/$section/binary-$arch/Packages.bz2"); @@ -658,7 +678,7 @@ } if ($getcontents) { foreach my $dist (@dists) { - foreach my $arch (@arches) { + foreach my $arch (keys %{$darches{$dist}}) { next if $dist=~/experimental/; next if $dist=~/.*-proposed-updates/; next if $arch=~/source/; @@ -677,7 +697,7 @@ next if ($section =~ /debian-installer/ && $dist eq "woody"); next if ($section =~ /debian-installer/ && $dist eq "experimental"); next if ($section =~ /debian-installer/ && $dist =~ /.*-proposed-updates/); - foreach my $arch (@arches) { + foreach my $arch (keys %{$darches{$dist}}) { get_packages("dists/$dist/$section/binary-$arch"); } # d-i has no sources over there, sources are in main @@ -712,7 +732,7 @@ if ($getcontents) { say("Get Contents files."); foreach my $dist (@dists) { - foreach my $arch (@arches) { + foreach my $arch (keys %{$darches{$dist}}) { next if $dist=~/experimental/; next if $dist=~/.*-proposed-updates/; next if $arch=~/source/; ============================================================ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]