tags 273309 +patch kthxbye I have attached a patch that implements this feature. Bradley Smith.
Index: checks/files =================================================================== --- checks/files (revision 1123) +++ checks/files (working copy) @@ -41,6 +41,10 @@ my %linked_against_libvga; my %script = (); +my @files; +my @devhelp_files; +my %links = (); + # read data from objdump-info file open(IN, '<', "objdump-info") or fail("cannot find objdump-info for $type package $pkg"); @@ -119,6 +123,13 @@ ($file, $link) = split(' -> ', $file); } + # devhelp data + push(@files, $file); + $links{$file} = $link; + push(@devhelp_files, $file) + if ($file =~ m,usr\/share\/gtk-doc\/html\/.*\.devhelp(\.gz)?$, || + $file =~ m,usr\/share\/devhelp\/books\/.*\.devhelp(\.gz)?$,); + $operm = perm2oct($perm); my ($year) = ($date =~ /^(\d{4})/); @@ -833,6 +844,22 @@ } close(IN); +# devhelp files +foreach $file (@files) { + my $found = 0; + if ($file =~ m,\.devhelp(\.gz)?$, && + $file !~ m,usr\/share\/gtk-doc\/html\/.*\.devhelp(\.gz)?$, && + $file !~ m,usr\/share\/devhelp\/books\/.*\.devhelp(\.gz)?$,) { + foreach my $link (@devhelp_files) { + if ($links{$link} && $file eq $links{$link}) { + $found = 1; + } + } + tag "package-contains-devhelp-file-without-symlink", "$file" + if ($found == 0); + } +} + #check for sect: games but nothing in /usr/games. Check for any binary to #save ourselves from game-data false positives: if ($pkg_section =~ m{games$} && Index: checks/files.desc =================================================================== --- checks/files.desc (revision 1123) +++ checks/files.desc (working copy) @@ -7,6 +7,11 @@ Info: This script checks if a binary package conforms to policy WRT to files and directories. +Tag: package-contains-devhelp-file-without-symlink +Type: warning +Info: Devhelp files should be symlinked into /usr/share/gtk-doc/html/ or + /usr/share/devhelp/books/. + Tag: package-contains-ancient-file Type: error Info: Your package contains a file that claims to been generated more Index: testset/tags.filenames =================================================================== --- testset/tags.filenames (revision 1123) +++ testset/tags.filenames (working copy) @@ -85,6 +85,8 @@ W: filenames: package-contains-arch-control-dir usr/lib/perl5/.arch-ids/ W: filenames: package-contains-arch-control-dir usr/lib/perl5/{arch}/ W: filenames: package-contains-bzr-control-dir usr/lib/perl5/.bzr/ +W: filenames: package-contains-devhelp-file-without-symlink usr/share/filenames/wrong.devhelp +W: filenames: package-contains-devhelp-file-without-symlink usr/share/filenames/wrong.devhelp.gz W: filenames: package-contains-empty-directory usr/lib/perl5/.arch-ids/ W: filenames: package-contains-empty-directory usr/lib/perl5/.bzr/ W: filenames: package-contains-empty-directory usr/lib/perl5/.svn/ Index: testset/filenames/debian/rules =================================================================== --- testset/filenames/debian/rules (revision 1123) +++ testset/filenames/debian/rules (working copy) @@ -34,6 +34,22 @@ cp -a files debian/tmp chmod -R go=rX debian/tmp/files + install -d debian/tmp/usr/share/filenames + install -d debian/tmp/usr/share/gtk-doc/html + install -d debian/tmp/usr/share/devhelp/books + touch debian/tmp/usr/share/filenames/wrong.devhelp + touch debian/tmp/usr/share/filenames/wrong.devhelp.gz + touch debian/tmp/usr/share/filenames/right1.devhelp + touch debian/tmp/usr/share/filenames/right1.devhelp.gz + touch debian/tmp/usr/share/filenames/right2.devhelp + touch debian/tmp/usr/share/filenames/right2.devhelp.gz + touch debian/tmp/usr/share/gtk-doc/html/non-symlink.devhelp + touch debian/tmp/usr/share/gtk-doc/html/non-symlink.devhelp.gz + ln -s usr/share/filenames/right1.devhelp debian/tmp/usr/share/gtk-doc/html/right1.devhelp + ln -s usr/share/filenames/right1.devhelp.gz debian/tmp/usr/share/gtk-doc/html/right1.devhelp.gz + ln -s usr/share/filenames/right2.devhelp debian/tmp/usr/share/devhelp/books/right2.devhelp + ln -s usr/share/filenames/right2.devhelp.gz debian/tmp/usr/share/devhelp/books/right2.devhelp.gz + install -d debian/tmp/usr/lib/filenames install -m 555 -d debian/tmp/usr/lib/filenames/readonly touch debian/tmp/usr/lib/filenames/readonly/test
Attachment:
signature.asc
Description: PGP signature