[SCM] Debian package checker branch, master, updated. 2.5.14-1-g90c809d
The following commit has been merged in the master branch:
commit 90c809ddc2e57246de02e598ff86947cd8eae426
Author: Niels Thykier <niels@thykier.net>
Date: Sat Jun 29 21:12:40 2013 +0200
coll/copyright-file: Don't create empty copyright files
If there is no (extractable) copyright file, don't waste an inode on
creating an empty one.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/copyright-file.pm b/checks/copyright-file.pm
index 4078c9d..ae06a1d 100644
--- a/checks/copyright-file.pm
+++ b/checks/copyright-file.pm
@@ -96,6 +96,7 @@ if (not $found) {
# #522827: special exception for perl for now
tag 'no-copyright-file'
unless $pkg eq 'perl';
+ return;
}
my $dcopy = $info->lab_data_path ('copyright');
diff --git a/collection/copyright-file b/collection/copyright-file
index 35d6dce..fc3042e 100755
--- a/collection/copyright-file
+++ b/collection/copyright-file
@@ -41,7 +41,6 @@ if (-d "$dir/unpacked/usr/share/doc/$pkg"
&& !is_ancestor_of("$dir/unpacked", "$dir/unpacked/usr/share/doc/$pkg")) {
# if the parent dir is outside the package, just stop here before we
# do something we will regret.
- touch_file("$dir/copyright");
return;
}
@@ -52,18 +51,13 @@ my $file = "$dir/unpacked/usr/share/doc/$pkg/copyright";
# unpack. Be careful about what symlinks we allow, though.
if (-l $file) {
my $link = readlink($file);
- if ($link =~ /\.\./ || ($link =~ m%/% && $link !~ m%^[^/]+(?:/+[^/]+)*\z%)) {
- touch_file("$dir/copyright");
- } else {
+ unless ($link =~ /\.\./ || ($link =~ m%/% && $link !~ m%^[^/]+(?:/+[^/]+)*\z%)) {
copy ($file, "$dir/copyright") or fail "cannot copy $file: $!";
}
} elsif (-f $file) {
link($file, "$dir/copyright");
} elsif (-f "$file.gz") {
gunzip_file ("$file.gz", "$dir/copyright");
-} else {
- # no copyright file found
- touch_file("$dir/copyright");
}
}
diff --git a/debian/changelog b/debian/changelog
index a5bd7bd..3e865fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+lintian (2.5.15) UNRELEASED; urgency=low
+
+ * collection/copyright-file:
+ + [NT] Avoid creating an empty copyright file when it is
+ not needed.
+
+ -- Niels Thykier <niels@thykier.net> Sat, 29 Jun 2013 21:11:09 +0200
+
lintian (2.5.14) unstable; urgency=low
* Summary of tag changes:
--
Debian package checker
Reply to: