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

[lintian] 02/02: Allow empty md5sums files. (Closes: #781372)



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

lamby pushed a commit to branch master
in repository lintian.

commit d03b70d46928b86c214bbf36887176e6a10370dd
Author: Chris Lamb <lamby@debian.org>
Date:   Tue Oct 17 18:00:53 2017 -0400

    Allow empty md5sums files. (Closes: #781372)
---
 checks/control-files.pm                   |  2 +-
 debian/changelog                          |  2 ++
 t/tests/legacy-binary/debian/debian/rules |  3 ---
 t/tests/legacy-binary/desc                |  3 ++-
 t/tests/legacy-binary/tags                |  1 -
 t/tests/md5sums-empty/debian/debian/rules | 10 ++++++++++
 t/tests/md5sums-empty/desc                |  5 +++++
 t/tests/md5sums-empty/tags                |  0
 8 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/checks/control-files.pm b/checks/control-files.pm
index bc9b2ab..cadb6e7 100644
--- a/checks/control-files.pm
+++ b/checks/control-files.pm
@@ -67,7 +67,7 @@ sub run {
 
         $experm = $ctrl->value($file);
 
-        if ($file->size == 0) {
+        if ($file->size == 0 and $file->basename ne 'md5sums') {
             tag 'control-file-is-empty', $file;
         }
 
diff --git a/debian/changelog b/debian/changelog
index 7efc144..c7a47c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,8 @@ lintian (2.5.56) UNRELEASED; urgency=medium
   * checks/fields.pm:
     + [CL] Apply patch from Nicolas Boulenguez to accept and recommend the
       new vcs-mtn mtn:// uri format.  (Closes: #878798)
+  * checks/md5sums.pm:
+    + [CL] Allow empty md5sums files.  (Closes: #781372)
   * checks/watch-file.pm:
     + [CL] Include the offending URI in debian-watch-uses-insecure-uri
       output, not the line number.
diff --git a/t/tests/legacy-binary/debian/debian/rules b/t/tests/legacy-binary/debian/debian/rules
index de484ae..a962ea9 100755
--- a/t/tests/legacy-binary/debian/debian/rules
+++ b/t/tests/legacy-binary/debian/debian/rules
@@ -84,9 +84,6 @@ binary-arch: build
 	dpkg-gencontrol -pbinary -isp
 	dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp
 
-	# Test an md5sums check while we're here.
-	touch debian/binary-data/DEBIAN/md5sums
-
 	dpkg --build debian/tmp ..
 	dpkg --build debian/binary-data ..
 
diff --git a/t/tests/legacy-binary/desc b/t/tests/legacy-binary/desc
index 6d57e26..6a06d5e 100644
--- a/t/tests/legacy-binary/desc
+++ b/t/tests/legacy-binary/desc
@@ -3,6 +3,8 @@ Source: binary
 Sequence: 9999
 Version: 4-1.1
 Description: Legacy test "binary"
+Test-Against:
+ control-file-is-empty
 Test-For:
  ancient-standards-version
  arch-dep-package-has-big-usr-share
@@ -13,7 +15,6 @@ Test-For:
  changelog-file-not-compressed
  changelog-news-debian-mismatch
  command-in-menu-file-and-desktop-file
- control-file-is-empty
  debian-changelog-file-missing-or-wrong-name
  debian-copyright-file-uses-obsolete-national-encoding
  debian-news-entry-has-strange-distribution
diff --git a/t/tests/legacy-binary/tags b/t/tests/legacy-binary/tags
index 816f1bd..06c266d 100644
--- a/t/tests/legacy-binary/tags
+++ b/t/tests/legacy-binary/tags
@@ -68,7 +68,6 @@ W: binary source: dm-upload-allowed-is-obsolete
 W: binary source: intra-source-package-circular-dependency binary binary-data
 W: binary source: maintainer-upload-has-incorrect-version-number 4-1.1
 W: binary source: native-package-with-dash-version
-W: binary-data: control-file-is-empty md5sums
 W: binary-data: empty-binary-package
 W: binary: binary-without-manpage usr/bin/hello
 W: binary: binary-without-manpage usr/bin/hello-static
diff --git a/t/tests/md5sums-empty/debian/debian/rules b/t/tests/md5sums-empty/debian/debian/rules
new file mode 100644
index 0000000..2bcc816
--- /dev/null
+++ b/t/tests/md5sums-empty/debian/debian/rules
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+TMP=debian/$(shell dh_listpackages)
+
+%:
+	dh $@
+
+override_dh_builddeb:
+	:>$(TMP)/DEBIAN/md5sums
+	dh_builddeb
diff --git a/t/tests/md5sums-empty/desc b/t/tests/md5sums-empty/desc
new file mode 100644
index 0000000..e056eb0
--- /dev/null
+++ b/t/tests/md5sums-empty/desc
@@ -0,0 +1,5 @@
+Testname: md5sums-empty
+Version: 1.0
+Description: Test of empty md5sums file
+Test-Against:
+ control-file-is-empty
diff --git a/t/tests/md5sums-empty/tags b/t/tests/md5sums-empty/tags
new file mode 100644
index 0000000..e69de29

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


Reply to: