Package: debmirror
Version: 1:2.8
Tags: patch

Hi,

I am trying to use --ignore-missing-release to support the use-case of
mirroring lenny/updates and squeeze/updates from security.debian.org
into a mirror which still contains the final state of etch/updates
(which I want to keep).

It works, but I have to use --nocleanup because debmirror (shown here
without --nocleanup and with --dry-run) wants to delete things that it
should not:

...
Cleanup mirror.
deleting .temp/dists/etch/updates/Release
deleting .temp/dists/etch/updates/Release.gpg
deleting dists/etch/updates/Release.gpg
All done.
...

("dists/etch/updates/Release" is being registered in %files as -1 by
http_get()'s failure logging, hence not appearing above.)

I think that in --ignore-missing-release mode, missing remote Release
and Release.gpg should be registered as present/needed - for example:

=== modified file 'debmirror'
--- debmirror   2011-03-23 07:33:10 +0000
+++ debmirror   2011-03-23 07:47:02 +0000
@@ -891,6 +891,14 @@
       }
     }
   }
+  elsif ($ignore_release) {
+    $files{"dists/$codename$dist_sdir/Release"}=1;
+    $files{$tempdir."/"."dists/$codename$dist_sdir/Release"}=1;
+    if (-f "dists/$codename$dist_sdir/Release.gpg") {
+      $files{"dists/$codename$dist_sdir/Release.gpg"}=1;
+      $files{$tempdir."/"."dists/$codename$dist_sdir/Release.gpg"}=1;
+    }
+  }
 }

 # Check that @di_dists contains valid codenames


Thanks!

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to