[SCM] Debian package checker branch, master, updated. 2.5.13-51-g7510809
The following commit has been merged in the master branch:
commit e683c4e86160a2a889a380c3e248909d756b48fe
Author: Niels Thykier <niels@thykier.net>
Date: Sat Jun 29 14:16:16 2013 +0200
coll/init.d: Avoid creating init.d dir if possible
If the package does not have a doc-base directory (or it is unsafe),
do not create an empty directory to signal this.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/init.d.pm b/checks/init.d.pm
index eb4dc7b..199ad63 100644
--- a/checks/init.d.pm
+++ b/checks/init.d.pm
@@ -187,6 +187,8 @@ foreach my $initd_file (keys %initd_postinst) {
}
}
+return unless -d $initd_dir;
+
# files actually installed in /etc/init.d should match our list :-)
opendir(my $dirfd, $initd_dir);
for my $script (readdir($dirfd)) {
diff --git a/collection/init.d b/collection/init.d
index fd4fe12..ba9372b 100755
--- a/collection/init.d
+++ b/collection/init.d
@@ -29,25 +29,21 @@ use lib "$ENV{'LINTIAN_ROOT'}/lib";
use Lintian::Util qw(copy_dir delete_dir fail is_ancestor_of);
sub collect {
-my ($pkg, $type, $dir) = @_;
+my (undef, undef, $dir) = @_;
if (-e "$dir/init.d") {
- delete_dir ("$dir/init.d")
+ delete_dir("$dir/init.d")
or fail('cannot rm old init.d directory');
}
if (-d "$dir/unpacked/etc/init.d") {
if (!is_ancestor_of("$dir/unpacked", "$dir/unpacked/etc/init.d")) {
# Unsafe, stop
- mkdir("$dir/init.d", 0777);
return;
}
copy_dir("$dir/unpacked/etc/init.d", "$dir/init.d")
or fail('cannot copy init.d directory');
-} else {
- # no etc/init.d
- mkdir("$dir/init.d", 0777);
}
}
diff --git a/collection/init.d.desc b/collection/init.d.desc
index 34a5826..5f66c9c 100644
--- a/collection/init.d.desc
+++ b/collection/init.d.desc
@@ -3,6 +3,6 @@ Author: Richard Braakman <dark@xs4all.nl>
Info: This script copies the etc/init.d directory into the lintian
directory.
Type: binary
-Version: 1
+Version: 2
Needs-Info: unpacked
Interface: perl-coll
--
Debian package checker
Reply to: