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

[lintian] 01/02: Restore /home/moon/.lintian as profile/data root dir



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

nthykier pushed a commit to branch master
in repository lintian.

commit f9de7d218006553dd4f61a6cabe1233e94310be5
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Oct 8 06:37:56 2017 +0000

    Restore /home/moon/.lintian as profile/data root dir
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 debian/changelog | 6 ++++++
 frontend/dplint  | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index cc6c065..60f2eb0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -53,6 +53,12 @@ lintian (2.5.55) UNRELEASED; urgency=medium
   * commands/lintian.pm:
     + [NT] Simplify handling of uncaught exceptions.
 
+  * frontend/dplint:
+    + [NT] Restore "$HOME/.lintian" as a directory that is used for
+      user profiles and data files.  It was advertised as such in the
+      documentation but the code actually only used the XDG_CONFIG_HOME
+      path.  Thanks to Daniel Kauffman for the report.  (Closes: #875636)
+
   * lib/Lintian/Util.pm:
     + [NT] Rename the "fail" subroutine to "internal_error" to better
       reflect its purpose.
diff --git a/frontend/dplint b/frontend/dplint
index 4d008ad..988c32b 100755
--- a/frontend/dplint
+++ b/frontend/dplint
@@ -122,13 +122,16 @@ sub setup_env {
     my ($user_dirs) = @_;
 
     if ($user_dirs) {
-        my $data_home;
+        my ($data_home, $legacy_user_data);
 
         load_file_basedir();
 
         if (exists($ENV{'HOME'}) or exists($ENV{'XDG_CONFIG_HOME'})) {
             $data_home = data_home('lintian');
         }
+        if (exists($ENV{'HOME'})) {
+            $legacy_user_data = "$ENV{HOME}/.lintian"
+        }
         if (defined($data_home) and $data_home !~ m@^/@) {
             # Turn the path into an absolute one.  Just in case
             # someone sets a relative HOME dir.
@@ -137,6 +140,8 @@ sub setup_env {
         }
         unshift(@RESTRICTED_INCLUDE_DIRS, $data_home)
           if defined($data_home) && -d $data_home;
+        unshift(@RESTRICTED_INCLUDE_DIRS, $legacy_user_data)
+            if defined($legacy_user_data) && -d $legacy_user_data;
         unshift(@RESTRICTED_INCLUDE_DIRS, '/etc/lintian')
           if -d '/etc/lintian';
     }

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


Reply to: