]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/commitdiff
Make ebuild versioned dependencies mirror exactly CPAN dependencies
authorVincent Pit <vince@profvince.com>
Wed, 15 Dec 2010 23:03:13 +0000 (00:03 +0100)
committerVincent Pit <vince@profvince.com>
Wed, 15 Dec 2010 23:03:13 +0000 (00:03 +0100)
This removes the most hairiest part of the prerequisites filtering.

lib/CPANPLUS/Dist/Gentoo.pm

index 6115b384607292b9f44a458a6cb8c291620e0361..a1fe7b6ce5b1425cb6eb01c835be9b258c51bcd7 100644 (file)
@@ -218,14 +218,7 @@ my $filter_prereqs = sub {
   next unless $obj; # Not in the module tree (e.g. Config)
   next if $obj->package_is_perl_core;
 
-  my $version;
-  if ($prereqs->{$prereq}) {
-   if ($obj->installed_version && $obj->installed_version < $obj->version) {
-    $version = $obj->installed_version;
-   } else {
-    $version = $obj->package_version;
-   }
-  }
+  my $version = $prereqs->{$prereq} || undef;
 
   push @requires, [ $obj->package_name, $version ];
  }