[SCM] Debian package checker branch, master, updated. 2.5.3-10-g3686e95
The following commit has been merged in the master branch:
commit 3686e95d8af55e5323d30cd91713cd8b18db5d00
Author: Niels Thykier <niels@thykier.net>
Date: Fri Sep 16 12:32:09 2011 +0200
Stricten the parser to not accept a field name with a ":"
diff --git a/debian/changelog b/debian/changelog
index fcb2f2b..d5640b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,11 @@ lintian (2.5.4) UNRELEASED; urgency=low
* lib/Lintian/Output/XML.pm:
+ [NT] Use self-closing tags (if possible) and do not write
attributes with an empty value.
+ * lib/Util.pm:
+ + [NT] Stricten the parser to not accept a field name with a ":".
+ This could cause the parser to eat the first part of the value,
+ if it contained a colon and there was no space before the vaue.
+ Thanks to Pino Toscano for reporting the issue.
-- Niels Thykier <niels@thykier.net> Sat, 10 Sep 2011 13:44:01 +0200
diff --git a/lib/Util.pm b/lib/Util.pm
index dda6385..9c57b82 100644
--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -115,7 +115,7 @@ sub _parse_dpkg_control_iterative {
}
}
# new empty field?
- elsif (m/^(\S+):\s*$/o) {
+ elsif (m/^([^: \t]+):\s*$/o) {
$open_section = 1;
my ($tag) = (lc $1);
@@ -124,7 +124,7 @@ sub _parse_dpkg_control_iterative {
$last_tag = $tag;
}
# new field?
- elsif (m/^(\S+):\s*(.*)$/o) {
+ elsif (m/^([^: \t]+):\s*(.*)$/o) {
$open_section = 1;
# Policy: Horizontal whitespace (spaces and tabs) may occur
diff --git a/t/tests/debhelper-dh-clean-k-deprecated/debian/debian/control.in b/t/tests/debhelper-misc-depends-fp/debian/debian/control.in
similarity index 90%
copy from t/tests/debhelper-dh-clean-k-deprecated/debian/debian/control.in
copy to t/tests/debhelper-misc-depends-fp/debian/debian/control.in
index d63c764..ebad94c 100644
--- a/t/tests/debhelper-dh-clean-k-deprecated/debian/debian/control.in
+++ b/t/tests/debhelper-misc-depends-fp/debian/debian/control.in
@@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 7)
Package: {$srcpkg}
Architecture: {$architecture}
-Depends: $\{misc:Depends\}
+Depends:$\{misc:Depends\}, $\{shlibs:Depends\}
Description: {$description}
This is a test package designed to exercise some feature or tag of
Lintian. It is part of the Lintian test suite and may do very odd
diff --git a/t/tests/debhelper-misc-depends-fp/desc b/t/tests/debhelper-misc-depends-fp/desc
new file mode 100644
index 0000000..c152845
--- /dev/null
+++ b/t/tests/debhelper-misc-depends-fp/desc
@@ -0,0 +1,5 @@
+Testname: debhelper-misc-depends-fp
+Sequence: 6000
+Version: 1.0
+Description: Test against missing reading the Depends field
+Test-Against: debhelper-but-no-misc-depends
diff --git a/t/debs/deb-format-record-size/tags b/t/tests/debhelper-misc-depends-fp/tags
similarity index 100%
copy from t/debs/deb-format-record-size/tags
copy to t/tests/debhelper-misc-depends-fp/tags
--
Debian package checker
Reply to: