[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 1.24.2-60-gfd43d8f



The following commit has been merged in the master branch:
commit 893e4531a64d388953bcea5d5dccd2ca2dd762fd
Author: Chris Lamb <chris@chris-lamb.co.uk>
Date:   Thu Jul 31 19:41:01 2008 +0100

    Emit a warning when a package embeds Mark Pilgrim's feedparser.py.
    
    We check the contents of the file first to avoid some false positives,
    particularly /usr/lib/python2.5/email/feedparser.py.

diff --git a/checks/files b/checks/files
index 64b6ce3..46f40c2 100644
--- a/checks/files
+++ b/checks/files
@@ -647,6 +647,18 @@ while (<IN>) {
 	    tag "embedded-javascript-library", "$file";
 	}
 
+	# ---------------- embedded Feedparser library
+	if ($file =~ m,/feedparser\.py$, and $pkg ne "python-feedparser") {
+	    open(FEEDPARSER, "unpacked/$file") or fail("cannot open feedparser.py file: $!");
+	    while (<FEEDPARSER>) {
+		if (m,Universal feed parser,) {
+		    tag "embedded-feedparser-library", "$file";
+		    last;
+		}
+	    }
+	    close(FEEDPARSER);
+	}
+
 	# ---------------- general: setuid/setgid files!
 	if ($perm =~ m/s/) {
 	    my ($setuid, $setgid) = ("","");
diff --git a/checks/files.desc b/checks/files.desc
index 519b0ed..326f29d 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -768,3 +768,10 @@ Info: This package contains an embedded copy of the JQuery, Prototype,
  own packages. Please depend on the appropriate package and symlink the
  library into the appropriate location.
 Ref: policy 4.13
+
+Tag: embedded-feedparser-library
+Type: warning
+Info: This package contains an embedded copy of Mark Pilgrim's Universal
+ Feed Parser. Please depend on the "python-feedparser" package and symlink
+ the library into the appropriate location.
+Ref: policy 4.13
diff --git a/testset/filenames/files/feedparser.py b/testset/filenames/files/feedparser.py
new file mode 100644
index 0000000..78f0866
--- /dev/null
+++ b/testset/filenames/files/feedparser.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+"""Universal feed parser
+
+Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
+
+Visit http://feedparser.org/ for the latest version
+Visit http://feedparser.org/docs/ for the latest documentation
+
+Required: Python 2.1 or later
+Recommended: Python 2.3 or later
+Recommended: CJKCodecs and iconv_codec <http://cjkpython.i18n.org/>
+"""
+
+__version__ = "4.1"# + "$Revision: 1.92 $"[11:15] + "-cvs"
+
+# (snip)
diff --git a/testset/tags.filenames b/testset/tags.filenames
index 88e5325..892bf19 100644
--- a/testset/tags.filenames
+++ b/testset/tags.filenames
@@ -61,6 +61,7 @@ W: filenames: binary-without-manpage usr/bin/X11/testxbin
 W: filenames: binary-without-manpage usr/bin/mh/read
 W: filenames: debian-news-file-not-compressed usr/share/doc/filenames/NEWS.Debian
 W: filenames: desktop-file-in-wrong-dir usr/share/gnome/apps/System/foo.desktop
+W: filenames: embedded-feedparser-library files/feedparser.py
 W: filenames: embedded-javascript-library usr/share/filenames/jquery.js
 W: filenames: embedded-javascript-library usr/share/filenames/jquery.lite.js
 W: filenames: embedded-javascript-library usr/share/filenames/jquery.min.js
@@ -84,6 +85,7 @@ W: filenames: file-in-unusual-dir files/.cvsignore
 W: filenames: file-in-unusual-dir files/Maelstrom Sounce.r121
 W: filenames: file-in-unusual-dir files/Maelstrom Sound
 W: filenames: file-in-unusual-dir files/Maelstrom Sound.mine
+W: filenames: file-in-unusual-dir files/feedparser.py
 W: filenames: file-in-unusual-dir files/svk-commitsEr9P.tmp
 W: filenames: file-in-unusual-dir files/svn-commit.tmp
 W: filenames: file-in-unusual-dir srv/foo/bar
@@ -121,6 +123,7 @@ W: filenames: package-contains-vcs-control-file usr/lib/perl5/foo/.hgtags
 W: filenames: package-installs-into-etc-gconf-schemas etc/gconf/schemas/test.schema
 W: filenames: package-installs-nonbinary-perl-in-usr-lib-perl5 usr/lib/perl5/foo/ancient.pm
 W: filenames: package-installs-nonbinary-perl-in-usr-lib-perl5 usr/lib/perl5/foo/bar.pm
+W: filenames: script-not-executable ./files/feedparser.py
 W: filenames: svk-commit-file-in-package files/svk-commitsEr9P.tmp
 W: filenames: svn-commit-file-in-package files/svn-commit.tmp
 W: filenames: symlink-is-self-recursive usr/lib/filenames/symlink10wrong ../../..

-- 
Debian package checker


Reply to: