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

[lintian] 01/01: L::R::Version: Create unique AptPkg::Config object



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 305492030f6bfc541b7d29af43fd26d5cef26a74
Author: Brendan O'Dea <bod@debian.org>
Date:   Sun Sep 11 13:56:31 2016 +0000

    L::R::Version: Create unique AptPkg::Config object
    
    This way we avoid messing with the global "_config" object in APT,
    which other programs may want to control.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 debian/changelog                | 4 ++++
 lib/Lintian/Relation/Version.pm | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index cec8200..3c56be4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -63,6 +63,10 @@ lintian (2.5.47) UNRELEASED; urgency=medium
   * debian/control:
     + [JW] Drop now-unused libdata-alias-perl from (Build-)Depends.
 
+  * lib/Lintian/Relation/Version.pm:
+    + [NT] Apply change from Brendan O'Dea to avoid (implicitly) messing
+      with the global APT "_config" object.  (Closes: #833656)
+
   * private/refresh-manual-refs:
     + [JW] Fix path to Debian policy for Java.
 
diff --git a/lib/Lintian/Relation/Version.pm b/lib/Lintian/Relation/Version.pm
index 3aa6389..2a21df0 100644
--- a/lib/Lintian/Relation/Version.pm
+++ b/lib/Lintian/Relation/Version.pm
@@ -33,7 +33,11 @@ BEGIN {
 }
 
 use AptPkg::Config '$_config';
-my $versioning = $_config->system->versioning;
+my $versioning = do {
+    my $config = AptPkg::Config->new;
+    $config->init;
+    $config->system->versioning;
+};
 
 =head1 NAME
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: