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

[lintian] 01/01: Detect an invalid debian/po/POTFILES.in instead of bailing out. (Closes: #883653)



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

lamby pushed a commit to branch master
in repository lintian.

commit 33169f9ab19f85028ca5dd0a8a4c202e4ae5528f
Author: Chris Lamb <lamby@debian.org>
Date:   Wed Dec 6 09:26:20 2017 +0000

    Detect an invalid debian/po/POTFILES.in instead of bailing out. (Closes: #883653)
---
 checks/po-debconf.desc | 12 ++++++++++++
 checks/po-debconf.pm   | 17 ++++++++++++-----
 debian/changelog       |  2 ++
 3 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/checks/po-debconf.desc b/checks/po-debconf.desc
index b5fbda1..d65a485 100644
--- a/checks/po-debconf.desc
+++ b/checks/po-debconf.desc
@@ -151,3 +151,15 @@ Info: Even though this package provides debconf translation support, there
   podebconf-report-po --call --withtranslators --deadline="+10 days" \
   --languageteam
 Ref: devref 6.5.2.2
+
+Tag: invalid-potfiles-in
+Severity: normal
+Certainty: certain
+Info: Errors were found in the <tt>debian/po/POTFILES.in</tt> file.
+ .
+ Please make sure that all strings marked for translation are in uniform
+ encoding (say UTF-8) then prepend the following line to POTFILES.in and
+ rerun intltool-update.
+ .
+  [encoding: UTF-8]
+Ref: #849912, #883653
diff --git a/checks/po-debconf.pm b/checks/po-debconf.pm
index 2e207eb..8e00397 100644
--- a/checks/po-debconf.pm
+++ b/checks/po-debconf.pm
@@ -187,12 +187,19 @@ sub run {
           if $d_templates;
 
         # Generate a "test.pot" (in a tempdir)
-        run_cmd(
-            \%intltool_opts,
+        if (
+            !eval {
+                run_cmd(
+                    \%intltool_opts,
 
-            '/usr/share/intltool-debian/intltool-update',
-            '--gettext-package=test','--pot'
-        );
+                    '/usr/share/intltool-debian/intltool-update',
+                    '--gettext-package=test','--pot'
+                );
+            }
+          ) {
+            tag 'invalid-potfiles-in';
+            return;
+        }
 
         # Compare our "test.pot" with the existing "templates.pot"
         (
diff --git a/debian/changelog b/debian/changelog
index 8ff512c..b51aea0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ lintian (2.5.62) UNRELEASED; urgency=medium
     + [CL] Also match, for example, "python2.7:all" when checking the
       "dependency-on-python-version-marked-for-end-of-life" tag, not just
       "python2.7".  (Closes: #883053)
+    + [CL] Detect an invalid debian/po/POTFILES.in instead of bailing out.
+      (Closes: #883653)
 
  -- Chris Lamb <lamby@debian.org>  Tue, 05 Dec 2017 15:27:44 +0000
 

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


Reply to: