Chris Lamb wrote:
> Patch (with testcase) attached.
Revised patch attached - I hadn't spotted the existing cvsignore rule.
Regards,
--
Chris Lamb, UK chris@chris-lamb.co.uk
GPG: 0x634F9A20
Index: checks/files
===================================================================
--- checks/files (revision 1122)
+++ checks/files (working copy)
@@ -568,6 +568,11 @@
tag "cvsignore-file-in-package", "$file";
}
+ # ---------------- .gitignore files
+ if ($file =~ m/\.gitignore$/) {
+ tag "gitignore-file-in-package", "$file";
+ }
+
# ---------------- arch-inventory files
if ($file =~ m/\.arch-inventory$/) {
tag "arch-inventory-file-in-package", "$file";
Index: checks/files.desc
===================================================================
--- checks/files.desc (revision 1122)
+++ checks/files.desc (working copy)
@@ -584,6 +584,17 @@
Info: Package contains a '.cvsignore' file. It may have been installed by
accident.
+Tag: gitignore-file-in-package
+Type: error
+Info: Package contains a .gitignore file. These files are used by the Git
+ revision control system to specify intentionally untracked files that
+ it should ignore.
+ .
+ It was most likely installed by accident. These files are useless and
+ can be suppressed by adding the following to <tt>debian/rules</tt>:
+ .
+ find debian/<i>pkg</i> -type f -name .gitignore | xargs rm -f
+
Tag: arch-inventory-file-in-package
Type: warning
Info: Package contains a '.arch-inventory' file. It may have been installed by
Index: testset/tags.filenames
===================================================================
--- testset/tags.filenames (revision 1122)
+++ testset/tags.filenames (working copy)
@@ -13,6 +13,7 @@
E: filenames: package-installs-file-to-usr-x11r6 usr/X11R6/
E: filenames: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/
E: filenames: package-installs-file-to-usr-x11r6-bin usr/X11R6/bin/testxbin2
+E: filenames: gitignore-file-in-package usr/lib/perl5/foo/.gitignore
E: filenames: package-installs-packlist usr/lib/perl5/foo/.packlist
E: filenames: postinst-does-not-call-updatemenus usr/share/menu/menu
E: filenames: postrm-does-not-call-updatemenus usr/share/menu/menu
Index: testset/filenames/debian/rules
===================================================================
--- testset/filenames/debian/rules (revision 1122)
+++ testset/filenames/debian/rules (working copy)
@@ -53,6 +53,7 @@
mkdir debian/tmp/usr/lib/perl5/.arch-ids
mkdir debian/tmp/usr/lib/perl5/.bzr
install -d debian/tmp/usr/share/perl5
+ echo foo > debian/tmp/usr/lib/perl5/foo/.gitignore
touch debian/tmp/usr/lib/perl5/foo/.packlist
chmod 644 debian/tmp/usr/lib/perl5/foo/.packlist
Attachment:
signature.asc
Description: PGP signature