r19024 - in /trunk/dh-make-perl: debian/changelog debian/control dh-make-perl

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Tue Apr 22 19:07:44 UTC 2008


Author: gregoa
Date: Tue Apr 22 19:07:43 2008
New Revision: 19024

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=19024
Log:
* Improve searching for dependencies with apt-file by using regexps; needs
  a recent version of apt-file.
* Rank packages not ending in -perl lower in apt-file search results.

Modified:
    trunk/dh-make-perl/debian/changelog
    trunk/dh-make-perl/debian/control
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/changelog?rev=19024&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Tue Apr 22 19:07:43 2008
@@ -1,8 +1,11 @@
 dh-make-perl (0.43) UNRELEASED; urgency=low
 
   * Evaluate --arch command line option earlier.
-
- -- gregor herrmann <gregor+debian at comodo.priv.at>  Tue, 08 Apr 2008 19:44:34 +0200
+  * Improve searching for dependencies with apt-file by using regexps; needs
+    a recent version of apt-file.
+  * Rank packages not ending in -perl lower in apt-file search results.
+
+ -- gregor herrmann <gregoa at debian.org>  Tue, 22 Apr 2008 20:42:25 +0200
 
 dh-make-perl (0.42) unstable; urgency=low
 

Modified: trunk/dh-make-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/debian/control?rev=19024&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/control (original)
+++ trunk/dh-make-perl/debian/control Tue Apr 22 19:07:43 2008
@@ -18,7 +18,7 @@
 Depends: debhelper (>= 4.0.2), libpod-parser-perl, ${perl:Depends}, make,
  dpkg-dev, fakeroot, ${misc:Depends}, libyaml-perl,  libmodule-depends-perl, 
  libwww-mechanize-perl
-Recommends: apt-file, libmodule-build-perl
+Recommends: apt-file (>= 2.1.0), libmodule-build-perl
 Description: Create Debian packages from perl modules
  dh-make-perl will create the files required to build a Debian source
  package out of a perl package.  This works for most simple packages

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=19024&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Tue Apr 22 19:07:43 2008
@@ -759,7 +759,7 @@
 	if (`which apt-file`) {
 	    $has_apt_file = 1;
 	    foreach my $module (@uses) {
-		my (@search, $ls, $ver, $re, $mod);
+		my (@rawsearch, @search, $ls, $ver, $re, $mod);
 
 		if ($module eq 'perl') {
 		    substitute_perl_dependency($dep_hash{perl});
@@ -770,13 +770,20 @@
 		print "Searching for $module package using apt-file.\n";
 		$module =~ s|::|/|g;
 
-		@search = `apt-file search $module.pm`;
-
 		# Regex's to search the return of apt-file to find the right pkg
 		$ls  = '(?:lib|share)';
 		$ver = '\d+(\.\d+)+';
 		$re  = "usr/(?:$ls/perl/$ver|$ls/perl5)/$module\\.pm";
 
+		@rawsearch = `apt-file search -x '$re'`;
+
+		# rank non -perl packages lower
+		@search = sort {
+			if ($a !~ /-perl: /)    { return 1; }
+			elsif ($b !~ /-perl: /) { return -1; }
+			else                    { return $a cmp $b; } # or 0?
+		} @rawsearch;
+		
 		for (@search) {
 		    # apt-file output
 		    # package-name: path/to/perl/module.pm




More information about the Pkg-perl-cvs-commits mailing list