[SCM] Debian package checker branch, master, updated. 2.5.13-51-g7510809
The following commit has been merged in the master branch:
commit a666a15bac33777dd0d77ca3a556b47c63c7a7d6
Author: Niels Thykier <niels@thykier.net>
Date: Sat Jun 29 13:18:06 2013 +0200
coll/doc-base-files: Avoid creating doc-base 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/menus.pm b/checks/menus.pm
index 5cd3d3c..55d47e7 100644
--- a/checks/menus.pm
+++ b/checks/menus.pm
@@ -172,18 +172,21 @@ if ($prerm{'calls-installdocs'} or $prerm{'calls-installdocs-r'}) {
# check consistency
# docbase file?
if ($docbase_file) {
- opendir(my $dirfd, $info->lab_data_path('doc-base'));
- my $dbfile;
- while (defined($dbfile = readdir($dirfd)) ) {
- next if $dbfile eq '.' or $dbfile eq '..';
- my $dbpath = $info->lab_data_path ("doc-base/$dbfile");
- # don't try to parse executables, plus we already warned about it
- # - skip symlinks as well, unlikely to be used for real doc-base files.
- next if -x $dbpath or -l $dbpath or not -f $dbpath;
- check_doc_base_file ($dbfile, $dbpath, $pkg, \%all_files, \%all_links,
- $group);
+ my $dbdir = $info->lab_data_path('doc-base');
+ if ( -d $dbdir) {
+ opendir(my $dirfd, $dbdir);
+ my $dbfile;
+ while (defined($dbfile = readdir($dirfd)) ) {
+ next if $dbfile eq '.' or $dbfile eq '..';
+ my $dbpath = "$dbdir/$dbfile";
+ # don't try to parse executables, plus we already warned about it
+ # - skip symlinks as well, unlikely to be used for real doc-base files.
+ next if -x $dbpath or -l $dbpath or not -f $dbpath;
+ check_doc_base_file($dbfile, $dbpath, $pkg, \%all_files, \%all_links,
+ $group);
+ }
+ closedir($dirfd);
}
- closedir($dirfd);
} elsif ($documentation) {
if ($pkg =~ /^libghc6?-.*-doc$/) {
# This is the library documentation for a haskell library. Haskell
diff --git a/collection/doc-base-files b/collection/doc-base-files
index 96e2494..552eca4 100755
--- a/collection/doc-base-files
+++ b/collection/doc-base-files
@@ -40,14 +40,10 @@ if ( -e "$dir/doc-base") {
if ( -d "$dir/unpacked/usr/share/doc-base") {
if (!is_ancestor_of("$dir/unpacked", "$dir/unpacked/usr/share/doc-base")) {
# Unsafe
- mkdir("$dir/doc-base", 0777);
return;
}
copy_dir ("$dir/unpacked/usr/share/doc-base", "$dir/doc-base")
or fail('cannot copy directory unpacked/usr/share/doc-base');
-} else {
- # no doc-base directory
- mkdir("$dir/doc-base", 0777);
}
}
diff --git a/collection/doc-base-files.desc b/collection/doc-base-files.desc
index c222f97..627a2ab 100644
--- a/collection/doc-base-files.desc
+++ b/collection/doc-base-files.desc
@@ -3,6 +3,6 @@ Author: Josip Rodin <jrodin@jagor.srce.hr>
Info: This script copies the contents of /usr/share/doc-base into the
lintian doc-base/ directory.
Type: binary
-Version: 1
+Version: 2
Needs-Info: unpacked
Interface: perl-coll
diff --git a/debian/changelog b/debian/changelog
index c7fc9d5..1ba648e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,8 +35,8 @@ lintian (2.5.14) UNRELEASED; urgency=low
* coll/*:
+ [NT] Set "Auto-Remove: yes" on several collections to
reduce the "inode pressure" on lintian.d.o.
- + [NT] Reduce the number of inodes used by removing some files,
- when these are empty.
+ + [NT] Reduce the number of inodes used by removing or not
+ creating some empty files and directories.
* coll/debfiles:
+ [NT] Remove test of the presence of unpacked.
* coll/file-info{,.desc}:
--
Debian package checker
Reply to: