[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.3-56-g54e2e02



The following commit has been merged in the master branch:
commit 997cb0179d40b72b0e4d4a9b112b7a45e328a791
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Oct 9 15:32:34 2011 +0200

    frontend: Do not auto-remove explicitly requested collections
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index 83d4fd0..3a14196 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -74,6 +74,11 @@ lintian (2.5.4) UNRELEASED; urgency=low
     + [NT] Added a correction for "propagate", thanks to Guillem Jover
       for the suggestion.  (Closes: #644793)
 
+  * frontend/lintian:
+    + [NT] Collections explicitly requested (by -U) are no longer
+      auto-removed.  Previously the only way to prevent auto-removal
+      was to use --keep-lab.
+
   * lib/Lab.pm:
     + [NT] Updated it to use Lintian::Output::verbosity_level rather
       than verbose.
diff --git a/frontend/lintian b/frontend/lintian
index cf49bf6..5eb785f 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1216,16 +1216,23 @@ if ($action eq 'unpack') {
             push @needed, @{$collection_info{$c}{'needs-info'}};
         }
     }
-    if ($unpack_info) {
-        # Add collections specifically requested by the user (--unpack-info)
-        for my $i (split(/,/,$unpack_info)) {
-            unless ($collection_info{$i}) {
-                fail("unknown info specified: $i");
-            }
-            $unpack_infos{$i} = 1;
+}
+
+if ($unpack_info) {
+    # Add collections specifically requested by the user (--unpack-info)
+    for my $i (split(/,/,$unpack_info)) {
+        unless ($collection_info{$i}) {
+            fail("unknown info specified: $i");
         }
+        $unpack_infos{$i} = 1;
+        # This implies always keeping them as well!  Note that auto_clean_package
+        # depends on this to do the "right thing".  If you remove this, please
+        # remember to update auto_clean_package.
+        $collection_info{$i}{'auto-remove'} = 0;
     }
 }
+
+
 # }}}
 
 # {{{ Create the dependency tree and populate it with checks and collections
@@ -1482,6 +1489,10 @@ sub load_checks{
 
 # Removes all collections with "Auto-Remove: yes"; takes a Lab::Package
 #  - depends on global variables %collection_info and $opt{'LINTIAN_ROOT'}
+#
+# Note: collections explicitly requested by the user (using -U coll) will
+# not be auto-removed *because* the argument handling of -U alters the
+# Auto-Remove value for these collections.
 sub auto_clean_package {
     my ($lpkg) = @_;
     my $pkg_name = $lpkg->pkg_name();
@@ -1644,8 +1655,7 @@ sub unpack_group {
             # We only need this if we are checking the package later
             $proc->lab_pkg($lpkg);
         } else {
-            # else we are done - not sure if it makes any sense if we are unpacking
-            # but this is the old behaviour, so we stick with it.
+            # else we are done
             if (!$keep_lab) {
                 auto_clean_package($lpkg) or $exit_code = 2;
             }
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index 3ed8af3..c344d8a 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -350,7 +350,10 @@ the exit status of Lintian.
 =item B<-U> info1,info2,..., B<--unpack-info> info1,info2,...
 
 Collect information info1, info2, etc. even if these are not required
-by the checks.
+by the checks.  Collections requested by this option are also not
+auto-removed (in this run).
+
+This option is mostly useful for debugging or special purpose setups.
 
 =back
 

-- 
Debian package checker


Reply to: