[Piuparts-devel] Bug#699028: piuparts: allow different mirrors for different releases (for lenny)

Ivo De Decker ivo.dedecker at ugent.be
Sat Jan 26 14:48:20 UTC 2013


package: piuparts
version: 0.49

Hi,

Trying to reproduce lenny -> squeeze -> wheezy upgrade issues is difficult
with piuparts, because the mirrors for squeeze and wheezy don't work for lenny
(only archive.debian.org works there).

It would be nice to be able to specify different mirrors (or entire
sources.list files) for different releases. That way, the lenny packages could
be downloaded from archive, and the others from a regular mirror.

BTW to help debugging piuparts run with multiple repo's, it could be nice to
include the sources.list in the dump output.

As a temporary workaround for people trying these upgrades, this dirty workaround
can be used:

--- /usr/sbin/piuparts	2013-01-12 12:31:24.000000000 +0100
+++ piuparts.lenny	2013-01-26 15:40:01.305433354 +0100
@@ -910,11 +910,15 @@
     def create_apt_sources(self, distro):
         """Create an /etc/apt/sources.list with a given distro."""
         lines = []
-        for mirror, components in settings.debian_mirrors:
-            lines.append("deb %s %s %s\n" %
-                         (mirror, distro, " ".join(components)))
+        if distro == "lenny":
+            lines.append("deb http://archive.debian.org/debian lenny main\n")
+        else:
+            for mirror, components in settings.debian_mirrors:
+                lines.append("deb %s %s %s\n" %
+                             (mirror, distro, " ".join(components)))
         for repo in settings.extra_repos:
             lines.append(repo + "\n")
+        dump("\n"+"".join(lines)+"\n")
         create_file(self.relative("etc/apt/sources.list"),
                     "".join(lines))
 



Cheers,

Ivo



More information about the Piuparts-devel mailing list