diff options
Diffstat (limited to 'lib/Youri/Repository.pm')
-rw-r--r-- | lib/Youri/Repository.pm | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/Youri/Repository.pm b/lib/Youri/Repository.pm index 30bd520..511765e 100644 --- a/lib/Youri/Repository.pm +++ b/lib/Youri/Repository.pm @@ -181,8 +181,6 @@ sub get_obsoleted_packages { my @packages; foreach my $obsolete ($package->get_obsoletes()) { my $pattern = $self->get_package_class()->get_pattern($obsolete->[Youri::Package::DEPENDENCY_NAME]); - my $obs = $obsolete->[Youri::Package::DEPENDENCY_NAME]; - my $range = $obsolete->[Youri::Package::DEPENDENCY_RANGE]; my @list; push(@list, map { $self->get_package_class()->new(file => $_) } @@ -192,23 +190,10 @@ sub get_obsoleted_packages { $pattern ) ); - my ($flag, $version) = $range =~ /(\S+)\s+(.*)/; - if ($version) { - my ($epoch, $ver, $release) = $version =~ /(?:(\d+):)?([^-]+(?:-[^-]*)?)/; - $release ||= '0'; - $epoch ||= '0'; - $range = "$flag $epoch-$ver-$release"; - print "Potential obsolete: @list\n"; - push @packages, grep { - my $full_version = $_->get_full_version; - print "Comparing $range with $full_version\n"; - URPM::ranges_overlap($range, "== $full_version") - } @list; - } else { - push @packages, @list - } + push @packages, grep { $package->range_check($obsolete, $_) } @list; } - print "Obsoleted: @packages\n"; + print "Obsoleted packages: @packages\n"; + exit; return @packages; } |