[SCM] Debian package checker branch, master, updated. 2.5.2-82-gf73604e
The following commit has been merged in the master branch:
commit f73604e61b5da3e1de3f693ee69d28682d95937b
Author: Niels Thykier <niels@thykier.net>
Date: Sat Sep 3 12:04:11 2011 +0200
Create the source field if it is not present
A number of checks rely on the presence of the source field to
exclude certain packages from various checks.
diff --git a/debian/changelog b/debian/changelog
index 813d2e4..ea7df5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -138,6 +138,10 @@ lintian (2.5.3) UNRELEASED; urgency=low
LANG.
+ [JW] Stricten the DCtrl parser to choke on some syntax errors
that was silently ignored. (Closes: #639516)
+ * lib/Lintian/Collect.pm:
+ + [JW,NT] Create the source field from the package field if the
+ former is not present. This fixes a number of false-positves
+ introduced in 2.5.2. (Closes: #640186)
* lib/Lintian/Collect/Source.pm:
+ [NT] Removed a requirement for fields that was not needed.
+ [NT] Fixed "index" method for source packages.
diff --git a/lib/Lintian/Collect.pm b/lib/Lintian/Collect.pm
index 9c994fd..a43786d 100644
--- a/lib/Lintian/Collect.pm
+++ b/lib/Lintian/Collect.pm
@@ -105,6 +105,7 @@ sub _get_field {
} else {
$fields = (get_deb_info("$base_dir/deb"));
}
+ $fields->{'source'} = $fields->{'package'} unless $fields->{'source'};
}
$self->{field} = $fields;
} else {
@@ -172,6 +173,14 @@ the control section of the package.
Otherwise this will return a hash of fields, where the key is the field
name (in all lowercase).
+Note: For binary and udeb packages, this method will create the
+"source"-field if it does not exist (using the value of the
+"package"-field as described in §5.6.1 of the Debian Policy Manual).
+
+Some checks rely on the presence "source"-field to whitelist some
+packages, so removing this behaviour may cause regressions (see
+bug 640186 for an example).
+
=item name()
Returns the name of the package.
--
Debian package checker
Reply to: