[SCM] Debian package checker branch, master, updated. 2.1.6-19-g6928edf
The following commit has been merged in the master branch:
commit e6ab5368ab8fd8194cae288a4fe828252187d218
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sun Jan 11 12:23:11 2009 -0600
Add direct-changes-in-diff-but-no-patch-system
Implement a check for direct changes in the diff and no patch system as
a pedantic tag.
Signed-off-by: Raphael Geissert <atomo64@gmail.com>
diff --git a/checks/patch-systems b/checks/patch-systems
index 2a79452..62dd8e0 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -178,23 +178,24 @@ sub run {
#----- general cruft checking:
- if ($uses_patch_system) {
- if ($uses_patch_system > 1) {
- tag "more-than-one-patch-system";
- }
+ if ($uses_patch_system > 1) {
+ tag "more-than-one-patch-system";
+ }
+ my @direct;
+ open(STAT, '<', "diffstat") or fail("cannot open diffstat file: $!");
+ while (<STAT>) {
+ my ($file) = (m,^\s+(.*?)\s+\|,)
+ or fail("syntax error in diffstat file: $_");
+ push (@direct, $file) if ($file !~ m,^debian/,);
+ }
+ close (STAT) or fail("error reading diffstat file: $!");
+ if (@direct) {
+ my $files = (@direct > 1) ? "$direct[0] and $#direct more" : $direct[0];
- my @direct;
- open(STAT, '<', "diffstat") or fail("cannot open diffstat file: $!");
- while (<STAT>) {
- my ($file) = (m,^\s+(.*?)\s+\|,)
- or fail("syntax error in diffstat file: $_");
- push (@direct, $file) if ($file !~ m,^debian/,);
- }
- close (STAT) or fail("error reading diffstat file: $!");
- if (@direct) {
- my $files = (@direct > 1) ? "$direct[0] and $#direct more" : $direct[0];
- tag "patch-system-but-direct-changes-in-diff", $files;
- }
+ tag "patch-system-but-direct-changes-in-diff", $files
+ if ($uses_patch_system);
+ tag "direct-changes-in-diff-but-no-patch-system", $files
+ if (not $uses_patch_system);
}
}
diff --git a/checks/patch-systems.desc b/checks/patch-systems.desc
index cee7c93..54174d3 100644
--- a/checks/patch-systems.desc
+++ b/checks/patch-systems.desc
@@ -108,3 +108,13 @@ Info: The build-dependencies list more than one patch system and it's
unlikely that you need both at the same time.
.
Currently lintian knows only dpatch and quilt.
+
+Tag: direct-changes-in-diff-but-no-patch-system
+Severity: pedantic
+Certainty: certain
+Info: The Debian diff.gz contains changes to files or creation of additional
+ files outside the <tt>debian</tt> directory. Keeping the changes as separate
+ patches under the control of a patch system allows for more fine grained
+ control over them. The package will also more easily support possible
+ future source package formats if all changes outside the <tt>debian</tt>
+ directory are stored as patches.
--
Debian package checker
Reply to: