lintian: r51 - in trunk: checks debian testset testset/maintainer-scripts/debian
Author: djpig
Date: 2004-02-21 18:39:10 +0100 (Sat, 21 Feb 2004)
New Revision: 51
Modified:
trunk/checks/shared-libs
trunk/debian/changelog
trunk/testset/info_tags.maintainer-scripts
trunk/testset/maintainer-scripts/debian/changelog
trunk/testset/maintainer-scripts/debian/postrm
trunk/testset/tags.maintainer-scripts
Log:
Be more tolerant to variations when checking for
postrm-unsafe-ldconfig. (Closes: #218543, #233740)
Modified: trunk/checks/shared-libs
===================================================================
--- trunk/checks/shared-libs 2004-02-21 16:29:04 UTC (rev 50)
+++ trunk/checks/shared-libs 2004-02-21 17:39:10 UTC (rev 51)
@@ -304,13 +304,16 @@
}
# Decide if we do it safely
+ s/\bldconfig\b/BldconfigB/g;
+ s/[ \t]//g;
# this one matches code from debhelper
- s/^if\s+\[\s+"\$1"\s+=\s+"remove"\s+\];\s+then\s+ldconfig\b//gm;
+ s/^if\["\$1"=.?remove.?\];?\n*then\n*BldconfigB//gm;
# variations...
- s/^if\s+\[\s+"remove"\s+=\s+"\$1"\s+\];\s+then\s+ldconfig\b//gm;
- s/^\[\s+"\$1"\s+=\s+"remove"\s+\]\s+&&\s+ldconfig\b//gm;
- s/^\[\s+"remove"\s+=\s+"\$1"\s+\]\s+&&\s+ldconfig\b//gm;
- if (/^[^\#]*\bldconfig\b/m) {
+ s/^if\[.?remove.?="\$1"\];?\n*then\n*BldconfigB//gm;
+ s/^\["\$1"=.?remove.?\]\&&BldconfigB//gm;
+ s/^\[.?remove.?="\$1"\]&&BldconfigB//gm;
+
+ if (/^[^\#]*BldconfigB/m) {
print "W: $pkg $type: postrm-unsafe-ldconfig\n";
}
}
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-02-21 16:29:04 UTC (rev 50)
+++ trunk/debian/changelog 2004-02-21 17:39:10 UTC (rev 51)
@@ -7,6 +7,11 @@
* checks/scripts:
+ Fix check for "exec ..." line. Fix suggested by Josip Rodin.
(Closes: #212811)
+ * checks/shared-libs:
+ + Be more tolerant to variations when checking for
+ postrm-unsafe-ldconfig. (Closes: #218543, #233740)
+ Thanks to Martin Godisch, Steinar H. Gunderson and
+ Aidas Kasparas for their input.
-- Frank Lichtenheld <djpig@debian.org> Sat, 21 Feb 2004 16:55:27 +0100
Modified: trunk/testset/info_tags.maintainer-scripts
===================================================================
--- trunk/testset/info_tags.maintainer-scripts 2004-02-21 16:29:04 UTC (rev 50)
+++ trunk/testset/info_tags.maintainer-scripts 2004-02-21 17:39:10 UTC (rev 51)
@@ -15,6 +15,13 @@
N: from FSSTND to FHS. That transition has been completed with woody and
N: thus this link is no longer required.
N:
+W: maintainer-scripts: postrm-has-useless-call-to-ldconfig
+N:
+N: The postrm script calls ldconfig even though no shared libraries are
+N: installed in a directory controlled by the dynamic library loader.
+N:
+N: Refer to Policy Manual, section 8.1.1 for details.
+N:
W: maintainer-scripts: possible-bashism-in-maintainer-script postinst:12 '. /usr/share/lintian/shell foo'
N:
N: This script is marked as running under /bin/sh, but it seems to use a
Modified: trunk/testset/maintainer-scripts/debian/changelog
===================================================================
--- trunk/testset/maintainer-scripts/debian/changelog 2004-02-21 16:29:04 UTC (rev 50)
+++ trunk/testset/maintainer-scripts/debian/changelog 2004-02-21 17:39:10 UTC (rev 51)
@@ -1,3 +1,10 @@
+maintainer-scripts (6) unstable; urgency=low
+
+ * added ldconfig calls to postrm to check test the postrm tests
+ from shared-libs
+
+ -- Frank Lichtenheld <djpig@debian.org> Sat, 21 Feb 2004 18:29:36 +0100
+
maintainer-scripts (5) unstable; urgency=low
* added bash style arrays to postinst, this one is for you Torsten (-:
Modified: trunk/testset/maintainer-scripts/debian/postrm
===================================================================
--- trunk/testset/maintainer-scripts/debian/postrm 2004-02-21 16:29:04 UTC (rev 50)
+++ trunk/testset/maintainer-scripts/debian/postrm 2004-02-21 17:39:10 UTC (rev 51)
@@ -4,3 +4,17 @@
echo "Hit enter"
read
+
+# neither of the following should be detected as postrm-unsafe-ldconfig
+# intended, without quotes
+ if [ "$1" = remove ]; then
+ ldconfig
+ fi
+# reversed, many whitespace
+if [ 'remove' = "$1" ]
+then
+
+ ldconfig
+fi
+
+[ "remove" ="$1" ] && ldconfig
Modified: trunk/testset/tags.maintainer-scripts
===================================================================
--- trunk/testset/tags.maintainer-scripts 2004-02-21 16:29:04 UTC (rev 50)
+++ trunk/testset/tags.maintainer-scripts 2004-02-21 17:39:10 UTC (rev 51)
@@ -1,5 +1,6 @@
W: maintainer-scripts source: ancient-standards-version 3.1.1
W: maintainer-scripts: postinst-should-not-set-usr-doc-link
+W: maintainer-scripts: postrm-has-useless-call-to-ldconfig
W: maintainer-scripts: possible-bashism-in-maintainer-script postinst:12 '. /usr/share/lintian/shell foo'
W: maintainer-scripts: possible-bashism-in-maintainer-script postinst:15 'read'
W: maintainer-scripts: possible-bashism-in-maintainer-script postinst:17 'H[0]='
Reply to: