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

lintian: r1311 - in trunk: debian frontend man



Author: djpig
Date: 2008-05-20 02:07:17 +0200 (Tue, 20 May 2008)
New Revision: 1311

Modified:
   trunk/debian/changelog
   trunk/frontend/lintian
   trunk/man/lintian.1
Log:
Add a --keep-lab option to make it easier to debug temporary
labs.  (Closes: #401046)


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-05-16 22:53:04 UTC (rev 1310)
+++ trunk/debian/changelog	2008-05-20 00:07:17 UTC (rev 1311)
@@ -20,6 +20,8 @@
       .changes files.  It can be annoying to have to ignore this error
       during testing and dupload/dput/dak/etc... all will error out
       on it anyway.  Suggested by martin f krafft.  (Closes: #382327)
+    + [FL] Add a --keep-lab option to make it easier to debug temporary
+      labs.  (Closes: #401046)
   
   * lib/Util.pm:
     + [FL] Only require Digest::SHA if the code path is really used.

Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian	2008-05-16 22:53:04 UTC (rev 1310)
+++ trunk/frontend/lintian	2008-05-20 00:07:17 UTC (rev 1311)
@@ -55,8 +55,9 @@
 our $show_overrides = 0;	#flag for --show-overrides switch
 our $color = 'never';		#flag for --color switch
 my $check_checksums = 0;	#flag for -m|--md5sums|--checksums switch
-my $allow_root = 0;		#flag for --allow-root swtich
+my $allow_root = 0;		#flag for --allow-root switch
 my $fail_on_warnings = 0;       #flag for --fail-on-warnings switch
+my $keep_lab = 0;		#flag for --keep-lab switch
 my $packages_file = 0;		#string for the -p option
 my $OPT_LINTIAN_LAB = "";	#string for the --lab option
 my $OPT_LINTIAN_ARCHIVEDIR = "";#string for the --archivedir option
@@ -146,6 +147,7 @@
     -m, --md5sums, --checksums check checksums when processing a .changes file
     --allow-root              suppress lintian\'s warning when run as root
     --fail-on-warnings        return a non-zero exit status if warnings found
+    --keep-lab                keep lab after run, even if temporary
 Configuration options:
     --cfg CONFIGFILE          read CONFIGFILE for configuration
     --lab LABDIR              use LABDIR as permanent laboratory
@@ -263,7 +265,8 @@
 	       "unpack-info|U=s" => \&record_unpack_info,
 	       "checksums|md5sums|m" => \$check_checksums,
 	       "allow-root" => \$allow_root,
-               "fail-on-warnings" => \$fail_on_warnings,
+	       "fail-on-warnings" => \$fail_on_warnings,
+	       "keep-lab" => \$keep_lab,
 	       # Note: Ubuntu has (and other derivatives might gain) a
 	       # -D/--debian option to make lintian behave like in Debian, that
 	       # is, to revert distribution-specific changes
@@ -316,6 +319,12 @@
 $verbose = 1 if $debug;
 $::verbose = $verbose; # that's $main::verbose
 
+# keep-lab implies unpack-level=2 unless explicetly
+# given otherwise
+if ($keep_lab and not defined $unpack_level) {
+    $unpack_level = 2;
+}
+
 # option --all and packages specified at the same time?
 if (($check_everything or $packages_file) and $#ARGV+1 > 0) {
     print STDERR "warning: options -a or -p can't be mixed with package parameters!\n";
@@ -1687,7 +1696,7 @@
     $SIG{'INT'} = 'DEFAULT';
     $SIG{'QUIT'} = 'DEFAULT';
 
-    $LAB->delete() if $LAB;
+    $LAB->delete() if $LAB and not $keep_lab;
 }
 
 sub interrupted {

Modified: trunk/man/lintian.1
===================================================================
--- trunk/man/lintian.1	2008-05-16 22:53:04 UTC (rev 1310)
+++ trunk/man/lintian.1	2008-05-20 00:07:17 UTC (rev 1311)
@@ -194,6 +194,17 @@
 exits with 0 status if only warnings were found.  If this flag is given,
 exit with a status of 1 if either warnings or errors are found.
 
+.TP
+.BR \-\-keep\-lab
+By default, temporary labs will be removed after lintian is finished.
+Specifying this options will leave the lab behind, which might be
+useful for debugging purposes.  You can find out where the temporary
+lab is located by running lintian with the
+.B \-\-verbose
+option.  Implies
+.B \-\-unpack\-level=2
+unless another unpack level is specified directly.
+
 .PP
 
 Configuration options:


Reply to: