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

[SCM] Debian package checker branch, lab-refactor, updated. 2.5.3-172-g1507655



The following commit has been merged in the lab-refactor branch:
commit d0fc0cd6387b31e49ba8133ac8387b8fc04206ac
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Oct 27 20:46:47 2011 +0200

    Deprecate --{archivivedir,dist,area,arch,section}
    
    These values are no longer used with unpack/* removed.
    
    The relevant ENV variables are now ignored and configuration values
    causes a deprecation warning but is otherwise ignored for now.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/frontend/lintian b/frontend/lintian
index a1fec51..a6df760 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -42,10 +42,6 @@ use Getopt::Long;
 #  - it is set after opt parsing and left at that; this allows it
 #    to be trivially removed once Checker and Lab have been fixed.
 #
-# LINTIAN_{ARCH,ARCHIVEDIR,AREA,DIST,LAB,ROOT}
-#  - These must be exported as environment variables as unpack/*
-#    depend on it.
-#
 # Please do not introduce any new magical variables, Thank You!
 #
 ### END LIST OF MAGIC VARIABLES
@@ -53,10 +49,6 @@ use Getopt::Long;
 our $LINTIAN_ROOT;
 
 my @MUST_EXPORT = (qw(
-    LINTIAN_ARCH
-    LINTIAN_ARCHIVEDIR
-    LINTIAN_AREA
-    LINTIAN_DIST
     LINTIAN_LAB
     LINTIAN_ROOT
 ));
@@ -73,10 +65,6 @@ my @ENV_VARS = (
 # LINTIAN_CFG  - handled manually
 # LINTIAN_ROOT - handled manually
 qw(
-    LINTIAN_ARCH
-    LINTIAN_ARCHIVEDIR
-    LINTIAN_AREA
-    LINTIAN_DIST
     LINTIAN_PROFILE
     LINTIAN_LAB
 ));
@@ -502,11 +490,11 @@ my %opthash = (                 # ------------------ actions
                'cfg=s' => \$opt{'LINTIAN_CFG'},
                'no-cfg' => \$no_conf,
                'lab=s' => \$opt{'LINTIAN_LAB'},
-               'archivedir=s' => \$opt{'LINTIAN_ARCHIVEDIR'},
-               'dist=s' => \$opt{'LINTIAN_DIST'},
-               'area=s' => \$opt{'LINTIAN_AREA'},
-               'section=s' => \$opt{'LINTIAN_AREA'},
-               'arch=s' => \$opt{'LINTIAN_ARCH'},
+               'archivedir=s' => \&deprecated,
+               'dist=s' => \&deprecated,
+               'area=s' => \&deprecated,
+               'section=s' => \&deprecated,
+               'arch=s' => \&deprecated,
                'profile=s' => \$opt{'LINTIAN_PROFILE'},
                'root=s' => \$opt{'LINTIAN_ROOT'},
 
@@ -648,6 +636,10 @@ if ($opt{'LINTIAN_CFG'}) {
                 last;
             }
         }
+        if (m/^\s*LINTIAN_(ARCH|ARCHIVEDIR|AREA|DIST)\s*=/o) {
+            print STDERR "LINTIAN_$1 is deprecated (Seen $opt{'LINTIAN_CFG'} at line $.)\n";
+            $found = 1;
+        }
         unless ($found) {
             # check if it is a config option
             if (m/^\s*([-a-z]+)\s*=\s*(.*\S)\s*$/o){
@@ -692,15 +684,6 @@ if ($opt{'color'} and $opt{'color'} !~ /^(?:never|always|auto|html)$/) {
     die "The color value must be one of \"never\", \"always\", \"auto\" or \"html\"\n";
 }
 
-# LINTIAN_ARCH must have a value.
-unless (defined $opt{'LINTIAN_ARCH'}) {
-    if ($opt{'LINTIAN_DIST'}) {
-        chop($opt{'LINTIAN_ARCH'}=`dpkg --print-architecture`);
-    } else {
-        $opt{'LINTIAN_ARCH'} = 'any';
-    }
-}
-
 # export current settings for our helper scripts
 foreach my $var (@MUST_EXPORT) {
     if ($opt{$var}) {
@@ -797,9 +780,6 @@ debug_msg(1,
           "Lintian root directory: $opt{'LINTIAN_ROOT'}",
           "Configuration file: $opt{'LINTIAN_CFG'}",
           "Laboratory: $opt{'LINTIAN_LAB'}",
-          "Archive directory: $opt{'LINTIAN_ARCHIVEDIR'}",
-          "Distribution: $opt{'LINTIAN_DIST'}",
-          "Architecture: $opt{'LINTIAN_ARCH'}",
           delimiter(),
     );
 
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index 3994bd6..70e60ff 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -358,26 +358,15 @@ Configuration options:
 
 =item B<--arch> arch
 
-When scanning for packages in the distdir, select only packages for
-architecture I<arch>.  This option overrides the B<LINTIAN_ARCH>
-environment variable and the configuration file entry of the same
-name.
+Deprecated, does nothing and may be removed in a later release.
 
 =item B<--area> area
 
-When scanning for packages in the distdir, select only packages from
-the comma-separated list of archive I<areas> (e.g. main, contrib).
-This option overrides the B<LINTIAN_AREA> environment variable and the
-configuration file entry of the same name.
+Deprecated, does nothing and may be removed in a later release.
 
 =item B<--archivedir> archivedir
 
-Location of Debian archive to scan for packages.  (See the L</FILES>
-section for complete information on how the path is constructed.)  Use
-this if you want Lintian to check the whole Debian archive instead of
-just single packages. This option overrides the B<LINTIAN_ARCHIVEDIR>
-environment variable and the configuration file entry of the same
-name.
+Deprecated, does nothing and may be removed in a later release.
 
 =item B<--cfg> configfile
 
@@ -392,17 +381,11 @@ B<--cfg> above.
 
 =item B<--dist> distdir
 
-Scan for packages in the I<distdir> directory.  (See the L</FILES>
-section for complete information on how the path is constructed.)  Use
-this if you want Lintian to check the whole Debian archive instead of
-just single packages.  This option overrides the B<LINTIAN_DIST>
-environment variable and the configuration file entry of the same
-name.
+Deprecated, does nothing and may be removed in a later release.
 
 =item B<--section> area
 
-This is an old name for the B<--area> option and accepted as a synonym
-for that option.
+Deprecated, does nothing and may be removed in a later release.
 
 =item B<--lab> labdir
 
@@ -544,18 +527,6 @@ Scripts that manage the I<laboratory>.
 The I</usr/share/lintian> directory can be overridden with the
 B<LINTIAN_ROOT> environment variable or the B<--root> option.
 
-When looking for packages in a Debian archive, lintian constructs the
-path to the archive from the I<archivedir>, I<distdir>, I<release>,
-and I<arch> as follows:
-
-=over 2
-
-I<archivedir>/dists/I<distdir>/I<release>/I<arch>
-
-=back
-
-Lintian always expects the "/dists/" path component in paths to Debian archives.
-
 For binary packages, Lintian looks for overrides in a file named
 I<usr/share/lintian/overrides/E<lt>packageE<gt>> inside the binary
 package, where I<E<lt>packageE<gt>> is the name of the binary

-- 
Debian package checker


Reply to: