[Debpool-commits] [SCM] Debpool Project Repository branch, master, updated. debian/0.3.6-11-g5af1f55

Andres Mejia mcitadel at gmail.com
Fri Oct 17 18:09:49 UTC 2008


The following commit has been merged in the master branch:
commit 5af1f5537e532808c5047b8a770fbcadd44504de
Author: Andres Mejia <mcitadel at gmail.com>
Date:   Fri Oct 17 14:09:44 2008 -0400

      * Fix issue where we were trying to delete obsolete files twice.
      * Fix issue where changes files were not being obsoleted for packages that
        build only architecture independent binaries (such as debpool).

diff --git a/bin/debpool b/bin/debpool
index 7a0db9e..dd4a5d7 100755
--- a/bin/debpool
+++ b/bin/debpool
@@ -383,7 +383,7 @@ foreach my $changefile (@changefiles) {
                 last; # Don't check other files, we failed
             }
         }
-    } # TODO: Will this work for a binNMU?
+    }
 
     next if ($rejected); # Reject message already logged, go to next package.
 
@@ -483,7 +483,7 @@ foreach my $changefile (@changefiles) {
     # And, now that that's done, audit the package area in the pool to get
     # rid of crufty, obsolete versions.
 
-    Audit_Package($package, $changes_data);
+    Audit_Package($package, $changefile, $changes_data);
 }
 
 # Regenerate {Packages,Sources}{,.gz} for distributions which need it. Also
diff --git a/debian/changelog b/debian/changelog
index 0380223..7f70c19 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,11 @@ debpool (0.3.10) experimental; urgency=low
 
   * Handle conffile renaming as suggested in
     http://wiki.debian.org/DpkgConffileHandling.
+  * Fix issue where we were trying to delete obsolete files twice.
+  * Fix issue where changes files were not being obsoleted for packages that
+    build only architecture independent binaries (such as debpool).
 
- -- Andres Mejia <mcitadel at gmail.com>  Fri, 17 Oct 2008 12:50:08 -0400
+ -- Andres Mejia <mcitadel at gmail.com>  Fri, 17 Oct 2008 14:08:49 -0400
 
 debpool (0.3.9) experimental; urgency=low
 
diff --git a/lib/DebPool/Packages.pm b/lib/DebPool/Packages.pm
index fc5d720..b89917e 100644
--- a/lib/DebPool/Packages.pm
+++ b/lib/DebPool/Packages.pm
@@ -871,7 +871,7 @@ sub Audit_Package {
     use DebPool::Dirs qw(:functions);
     use DebPool::Logging qw(:functions :facility :level);
 
-    my($package, $changes_hashref) = @_;
+    my($package, $changefile, $changes_hashref) = @_;
 
     # Checking for version of package being installed
     my $changes_version = $changes_hashref->{'Version'};
@@ -898,14 +898,13 @@ sub Audit_Package {
 
     my $unlinked = 0;
     foreach my $file (@pool_files) {
-        my $orig = 0;
-        my $deb = 0;
-        my $src = 0;
-        my $bin_package = 0;
-        my $version;
-
         # Go through each architecture in the changes file
         foreach my $arch (@changes_arch) {
+            my $orig = 0;
+            my $deb = 0;
+            my $src = 0;
+            my $bin_package = 0;
+            my $version = 0;
             if ($arch eq 'source') {
                 if ($file =~ m/^([^_]+)_([^_]+)\.orig\.tar\.gz$/) { #orig.tar.gz
                     $bin_package = $1;
@@ -977,6 +976,14 @@ sub Audit_Package {
     }
 
     # Now we want to do the same for the changes files.
+    # First, we'll want to include the architecture the changes file was
+    # generated from. This is in case that package builds only architecture
+    # independent packages, such as debpool.
+    my $changefile_arch = $changefile;
+    $changefile_arch =~ s/^[^_]+_[^_]+_([^.]+)\.changes$/$1/;
+    if (!grep {$_ eq $changefile_arch} @changes_arch) {
+        push @changes_arch, $changefile_arch;
+    }
     foreach my $file (@changes) {
         foreach my $arch (@changes_arch) {
             my $version = 0;

-- 
Debpool Project Repository



More information about the Debpool-commits mailing list