r56175 - /trunk/dh-make-perl/lib/Debian/AptContents.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Fri Apr 16 14:47:38 UTC 2010


Author: dmn
Date: Fri Apr 16 14:47:30 2010
New Revision: 56175

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56175
Log:
construct alternative dependency only when needed

no point when a single package matches the requirements

Modified:
    trunk/dh-make-perl/lib/Debian/AptContents.pm

Modified: trunk/dh-make-perl/lib/Debian/AptContents.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/lib/Debian/AptContents.pm?rev=56175&op=diff
==============================================================================
--- trunk/dh-make-perl/lib/Debian/AptContents.pm (original)
+++ trunk/dh-make-perl/lib/Debian/AptContents.pm Fri Apr 16 14:47:30 2010
@@ -429,10 +429,11 @@
     } @matches;
 
     my $direct_dep;
-    $direct_dep
-        = Debian::Dependency->new(
-        [ map ( { pkg => $_, rel => '>=', ver => $version }, @matches ) ] )
-        if @matches;
+    $direct_dep = Debian::Dependency->new(
+          ( @matches > 1 )
+        ? [ map ( { pkg => $_, rel => '>=', ver => $version }, @matches ) ]
+        : ( $matches[0], $version )
+    ) if @matches;
 
     my $running_perl = $Config::Config{version};
 




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