lintian: r1326 - in trunk: checks debian testset testset/etcfiles/debian
Author: djpig
Date: 2008-05-29 23:32:44 +0200 (Thu, 29 May 2008)
New Revision: 1326
Modified:
trunk/checks/md5sums
trunk/debian/changelog
trunk/testset/etcfiles/debian/control
trunk/testset/etcfiles/debian/rules
trunk/testset/tags.etcfiles
Log:
* checks/md5sums:
+ Don't complain about missing md5sums file if the
package only contains conffiles. (Closes: #482869)
Modified: trunk/checks/md5sums
===================================================================
--- trunk/checks/md5sums 2008-05-29 15:34:56 UTC (rev 1325)
+++ trunk/checks/md5sums 2008-05-29 21:32:44 UTC (rev 1326)
@@ -34,31 +34,6 @@
my %info_entry;
my %conffile;
-# Is there a md5sums control file?
-unless (-f $control) {
- tag "no-md5sums-control-file", "" unless -z "md5sums";
- return 0;
-}
-
-# Is it empty? Then skip it. Tag will be issued by control-files
-if (-z $control) {
- return 0;
-}
-
-# read in md5sums control file
-open(C, '<', $control)
- or fail("cannot open md5sums control file $control: $!");
-while (<C>) {
- chop;
- next if m/^\s*$/;
- if (m{^([a-f0-9]+)\s*(?:\./)?(\S.*)$} && length($1) == 32) {
- $control_entry{$2} = $1;
- } else {
- tag "malformed-md5sums-control-file", "line $.";
- }
-}
-close(C);
-
# read in md5sums info file
open(C, '<', "md5sums") or fail("cannot open md5sums info file: $!");
while (<C>) {
@@ -85,6 +60,46 @@
close(C);
}
+# Is there a md5sums control file?
+unless (-f $control) {
+ # ignore if package contains no files
+ return 0 if -z "md5sums";
+
+ # check if package contains non-conffiles
+ # debhelper doesn't create entries in md5sums
+ # for conffiles since this information would
+ # be redundant
+ my $only_conffiles = 1;
+ foreach my $file (keys %info_entry) {
+ unless ($conffile{$file}) {
+ $only_conffiles = 0;
+ last;
+ }
+ }
+
+ tag "no-md5sums-control-file", "" unless $only_conffiles;
+ return 0;
+}
+
+# Is it empty? Then skip it. Tag will be issued by control-files
+if (-z $control) {
+ return 0;
+}
+
+# read in md5sums control file
+open(C, '<', $control)
+ or fail("cannot open md5sums control file $control: $!");
+while (<C>) {
+ chop;
+ next if m/^\s*$/;
+ if (m{^([a-f0-9]+)\s*(?:\./)?(\S.*)$} && length($1) == 32) {
+ $control_entry{$2} = $1;
+ } else {
+ tag "malformed-md5sums-control-file", "line $.";
+ }
+}
+close(C);
+
for my $file (keys %control_entry) {
if (not exists $info_entry{$file}) {
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-05-29 15:34:56 UTC (rev 1325)
+++ trunk/debian/changelog 2008-05-29 21:32:44 UTC (rev 1326)
@@ -1,5 +1,9 @@
lintian (1.23.50) unstable; urgency=low
+ * checks/md5sums:
+ + [FL] Don't complain about missing md5sums file if the
+ package only contains conffiles. (Closes: #482869)
+
* reporting/templates/clean.tmpl:
+ [FL] Include link to full maintainer report. Suggested by
Kartik Mistry.
Modified: trunk/testset/etcfiles/debian/control
===================================================================
--- trunk/testset/etcfiles/debian/control 2008-05-29 15:34:56 UTC (rev 1325)
+++ trunk/testset/etcfiles/debian/control 2008-05-29 21:32:44 UTC (rev 1326)
@@ -9,3 +9,8 @@
Depends: ${shlibs:Depends}
Description: test handling of files in /etc
Regression test for lintian's handling of files in /etc.
+
+Package: only-etcfiles
+Architecture: all
+Depends: etcfiles (= ${source:Version})
+Description: test handling of conffile-only package
Modified: trunk/testset/etcfiles/debian/rules
===================================================================
--- trunk/testset/etcfiles/debian/rules 2008-05-29 15:34:56 UTC (rev 1325)
+++ trunk/testset/etcfiles/debian/rules 2008-05-29 21:32:44 UTC (rev 1326)
@@ -1,10 +1,12 @@
#!/usr/bin/make -f
tmp=debian/tmp
+tmponly=debian/only-etcfiles
clean:
rm -f debian/files debian/substvars
rm -rf debian/tmp
+ rm -rf debian/only-etcfiles
build:
binary-indep:
@@ -42,9 +44,19 @@
echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \
>> debian/tmp/DEBIAN/md5sums
- dpkg-gencontrol -isp
- dpkg --build debian/tmp ..
+ install -d $(tmponly)/etc/etcfiles
+ touch $(tmponly)/etc/etcfiles/foo
+ touch $(tmponly)/etc/etcfiles/bar
+ install -d $(tmponly)/usr/share/doc
+ cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles
+ install -d $(tmponly)/DEBIAN
+ install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles
+ dpkg-gencontrol -isp -petcfiles
+ dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly)
+ dpkg --build $(tmp) ..
+ dpkg --build $(tmponly) ..
+
binary: binary-indep
.PHONY: binary-indep binary clean
Modified: trunk/testset/tags.etcfiles
===================================================================
--- trunk/testset/tags.etcfiles 2008-05-29 15:34:56 UTC (rev 1325)
+++ trunk/testset/tags.etcfiles 2008-05-29 21:32:44 UTC (rev 1326)
@@ -6,7 +6,9 @@
E: etcfiles: md5sum-mismatch etc/proper
E: etcfiles: md5sums-lists-nonexisting-file usr/bin/foo
E: etcfiles: no-copyright-file
+E: only-etcfiles: extended-description-is-empty
W: etcfiles source: ancient-standards-version 3.5.0 (current is 3.7.3)
+W: etcfiles source: not-binnmuable-all-depends-any only-etcfiles -> etcfiles
W: etcfiles: changelog-file-not-compressed changelog
W: etcfiles: file-missing-in-md5sums etc/improper-link
W: etcfiles: file-missing-in-md5sums usr/share/doc/etcfiles/changelog
Reply to: