#544132 debmirror: No longer able to mirror hardy.

#544132#5
Date:
2009-08-29 05:16:22 UTC
From:
To:
Since 1:2.0, debmirror fails with "Duplicate dist hardy."  Here's the command
line:

debmirror --progress --verbose --host=us.archive.ubuntu.com --root=/ubuntu --dist=hardy,hardy-security,hardy-updates --section=main,restricted --method=http /media/mirror/hardy

The fix to #426170 in 1:1.0 broke hardy for the same reason it broke
experimental--the suite and codename are the same in the Release file.  I hoped
that the fix to #542929 solved the problem with hardy too, but it seems it
didn't.  I haven't had time to digest the code yet so that's as much as I can
say right now.

I know being able to mirror Ubuntu repositories might not be a priority so I'll
try to find time to make a patch.

Thanks!
Dave

#544132#10
Date:
2009-08-29 11:06:23 UTC
From:
To:
Can you try with the following change?

 sub split_dist {
   my $dist = shift;
-  my ($dist_raw) = ($dist =~ m:^([^/]+)/?:);
-  $dist =~ m:^[^/]+(/.*)?$:;
+  my ($dist_raw) = ($dist =~ m:^([^-/]+)[-/]?:);
+  $dist =~ m:^[^-/]+([-/].*)?$:;
   my $dist_sdir = $1 // "";
   return ($dist_raw, $dist_sdir);
 }

Untested, but I think it should fix things for you.

Cheers,
FJP

#544132#15
Date:
2009-08-29 12:51:18 UTC
From:
To:
After looking at Ubuntu's Release files I don't think that's going to
work. Please try the attached patch instead.

#544132#20
Date:
2009-08-29 16:48:50 UTC
From:
To:
tags 544132 patch pending
thanks

There's a closing brace missing in that patch, but otherwise it works OK
for me in a dry run. So I'll just upload the fix.

#544132#25
Date:
2009-08-29 18:02:11 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
debmirror, which is due to be installed in the Debian FTP archive:

debmirror_2.1.dsc
  to pool/main/d/debmirror/debmirror_2.1.dsc
debmirror_2.1.tar.gz
  to pool/main/d/debmirror/debmirror_2.1.tar.gz
debmirror_2.1_all.deb
  to pool/main/d/debmirror/debmirror_2.1_all.deb



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 544132@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Frans Pop <fjp@debian.org> (supplier of updated debmirror 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@debian.org)
Format: 1.8
Date: Sat, 29 Aug 2009 18:55:25 +0200
Source: debmirror
Binary: debmirror
Architecture: source all
Version: 1:2.1
Distribution: unstable
Urgency: low
Maintainer: Frans Pop <fjp@debian.org>
Changed-By: Frans Pop <fjp@debian.org>
Description:
 debmirror  - Debian partial mirror script, with ftp and package pool support
Closes: 153680 156564 422100 544132 544139
Changes:
 debmirror (1:2.1) unstable; urgency=low
 .
   * Fix location of debmirror.conf. Closes: #544139.
   * Don't display download speed if rsync is used. Closes: #422100.
   * Support mirroring specific additional files from specific locations on
     the mirror: trace files, ./doc, ./indices and ./tools. The transfer
     method used for this is always rsync, irrespective of what method is
     specified in the --method option. Closes: #153680, #156564.
   * Ubuntu uses an identical Codename for different suites, so just ignore
     it and use the Suite instead. Closes: #544132.
Checksums-Sha1:
 b0e7b4aca514d90e5ca611e27a027725a06724b7 798 debmirror_2.1.dsc
 7fcc3b63554dfb03c8c512e0c97e518e4c13aed5 34435 debmirror_2.1.tar.gz
 5a7e54b17289361eca7578ad990f61e835967f82 43918 debmirror_2.1_all.deb
Checksums-Sha256:
 2ab6f2677de12938a73c75adc9a55787a364cf38ca234994ba0fe30ed3803d6a 798 debmirror_2.1.dsc
 0f670e87d0938401c5c38cd7470c62be7cc2088242c3fd0b22885957139eb0c8 34435 debmirror_2.1.tar.gz
 9665a98739ed8a45b0c8a0b134352907f0f2dd14d2d914d52a03d0efe9d268eb 43918 debmirror_2.1_all.deb
Files:
 4095c1b794ac95268e986166aed4c073 798 net extra debmirror_2.1.dsc
 cbb580b5da09370d902a6a6416ef0fb8 34435 net extra debmirror_2.1.tar.gz
 efd6a2be8f489f78ab0c626986771e5e 43918 net extra debmirror_2.1_all.deb
iEYEARECAAYFAkqZZXgACgkQgm/Kwh6ICoQOMgCdEu0nx+fQD/DNPBYZRnAtGhD+
hFcAnj5nhgSLiPMeZMj773Qyoz1+2PPY
=C/JD
-----END PGP SIGNATURE-----

#544132#36
Date:
2010-10-19 10:45:50 UTC
From:
To:
unarchive 544132
reopen 544132
found 544132 1:2.4.6
thanks

This is still an issue with other Ubuntu-like archives, i.e.
archive.canonical.com, which I mirror internally for bandwidth-saving
reasons.

I'm using this hacky patch, but a more general solution would be great:
------------------------------------------------------------------
|--- old/debmirror        2010-04-11 20:32:07.000000000 +0200
|+++ new/debmirror        2010-10-19 12:10:48.000000000 +0200
|@@ -1906,7 +1906,7 @@
|
|   if ($origin eq "none") {
|     $codename = $dist_raw;
|-  } elsif ($origin eq "Ubuntu") {
|+  } elsif ($origin eq "Ubuntu" || $origin eq "Canonical") {
|     if ($suite) {
|       say("Ubuntu Release file: using Suite ($suite).");
|       $codename = $suite;
------------------------------------------------------------------

SR

#544132#43
Date:
2010-10-19 16:05:13 UTC
From:
To:
Stefano Rivera wrote:

My guess is that this ugly hack was only needed to hande the transition
in 1:1.0 when existing mirrors had directories moved around. I suspect
if enough of that transition code was removed the hack could be gotten
rid of.