source: soft/build_system/build_system/upload/robot/trunk/ndoble @ 1

Last change on this file since 1 was 1, checked in by fasma, 13 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 636 bytes
Line 
1#!/usr/bin/perl
2## Remove the doble rpm according to the date
3use URPM;
4
5@list = sort @ARGV;
6
7foreach (@list) {
8    next unless /\.rpm$/;
9    ($name, $version, $release) = m|([^/]+)-[^-]+-[^-]+\.[^.]+\.rpm$|;
10    $name =~ /kernel-(\d+\.\d+)\.\d+(\.\d+\w+)?/ and $name = "kernel-$1";
11    $name =~ /kernel-([^-]+(-[^-]+)*)-(\d+\.\d+)\.\d+(\.\d+\w+)?/ and $name = "kernel-$1-$2";
12    if ($name eq $last) {
13        URPM::ranges_overlap("== $version-$release","> $last_version-$last_release") ? print "$_ " : print "$lastfile "
14    } 
15    $last = $name;
16    $last_version = $version;
17    $last_release = $release;
18    $lastfile = $_;
19}
20print "\n";
Note: See TracBrowser for help on using the repository browser.