This is an automated email from the git hooks/post-receive script. broucaries-guest pushed a commit to branch master in repository lintian.
commit 9e4ebee65eb16286e6bee453531d747f65e374ba Author: Bastien ROUCARIÈS <[email protected]> Date: Fri Apr 11 11:16:05 2014 +0200 Add advices for embedded libraries Signed-off-by: Bastien ROUCARIÈS <[email protected]> --- checks/files.pm | 14 ++++++++++---- t/tests/files-embedded/tags | 8 ++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/checks/files.pm b/checks/files.pm index 1222974..c453b89 100644 --- a/checks/files.pm +++ b/checks/files.pm @@ -92,10 +92,15 @@ sub _load_file_package_list_mapping { $datafile, qr/\s*\~\~\s*/, sub { - my $pkg_regexp = qr/^$_[0]$/x; + my $pkg = strip($_[0]); + my $pkg_regexp = qr/^$pkg$/x; my $file_regexp = strip($_[1]); $file_regexp =~ s/\$EXT/$ext/g; - return { 'main_pkg' => $pkg_regexp, 'match' => qr/$file_regexp/ }; + return { + 'pkg_re' => $pkg_regexp, + 'pkg' => $pkg, + 'match' => qr/$file_regexp/, + }; }); return { 'ext_regexp' => qr/$ext/x, @@ -138,7 +143,8 @@ sub _detect_embeded_libraries { LIBRARY: foreach my $library ($mapping->all) { my $library_data = $mapping->value($library); - my $mainre = $library_data->{'main_pkg'}; + my $mainre = $library_data->{'pkg_re'}; + my $mainpkg = $library_data->{'pkg'}; my $filere = $library_data->{'match'}; unless ($fname =~ m,$filere,) { next LIBRARY; @@ -165,7 +171,7 @@ sub _detect_embeded_libraries { next LIBRARY; } } - tag $typetag, $file; + tag $typetag, $file, 'please use', $mainpkg; } } } diff --git a/t/tests/files-embedded/tags b/t/tests/files-embedded/tags index 8c19185..7347c45 100644 --- a/t/tests/files-embedded/tags +++ b/t/tests/files-embedded/tags @@ -1,5 +1,5 @@ W: files-embedded: embedded-feedparser-library usr/share/php/feedparser.py -W: files-embedded: embedded-javascript-library usr/share/php/jquery.js -W: files-embedded: embedded-javascript-library usr/share/php/jquery.min.js -W: files-embedded: embedded-php-library usr/share/php/rss_parse.php -X: files-embedded: embedded-pear-module usr/share/php/IPv4.php +W: files-embedded: embedded-javascript-library usr/share/php/jquery.js please use libjs-jquery +W: files-embedded: embedded-javascript-library usr/share/php/jquery.min.js please use libjs-jquery +W: files-embedded: embedded-php-library usr/share/php/rss_parse.php please use libphp-magpierss +X: files-embedded: embedded-pear-module usr/share/php/IPv4.php please use php-net-ipv4 -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

