7 |
|
|
8 |
my $rpm_flags = RPM2->vsf_nodsa; |
my $rpm_flags = RPM2->vsf_nodsa; |
9 |
my @repositories = qw( |
my @repositories = qw( |
10 |
/mirrors/centos/4/updates/SRPMS/ |
/mirrors/centos/4/fasttrack/SRPMS |
11 |
/mirrors/centos/4/os/SRPMS/ |
/mirrors/centos/4/updates/SRPMS |
12 |
/mirrors/centos/4/dag/SRPMS/ |
/mirrors/centos/4/os/SRPMS |
13 |
/mirrors/centos/4/atrpms/SRPMS/SRPMS.stable/ |
/mirrors/centos/4/extras/SRPMS |
14 |
/mirrors/centos/4/dries/SRPMS/ |
/mirrors/rpmforge/dag/source/ |
15 |
/mirrors/fedora/updates/3/SRPMS/ |
/mirrors/atrpms/src/el4-i386/atrpms/stable/ |
16 |
/mirrors/fedora/3/SRPMS/ |
/mirrors/fedora-legacy/fedora/3/updates/SRPMS/ |
17 |
/mirrors/mitel/devel/repo/SRPMS/ |
/mirrors/fedora-legacy/fedora/3/os/SRPMS/ |
18 |
/builds/rpms/SRPMS/ |
/builds/rpms/SRPMS/ |
19 |
); |
); |
20 |
|
|
21 |
opendir RPMS, "/builds/RPMS" or die "Couldn't opendir /builds/RPMS"; |
opendir RPMS, "/builds/RPMS" or die "Couldn't opendir /builds/RPMS"; |
22 |
my %rpms = map { my $x = RPM2->open_package("/builds/RPMS/$_", $rpm_flags); $x->tag('NAME') => $x; } grep { /\.rpm$/ } readdir RPMS; |
my %rpms = map { my $x = RPM2->open_package("/builds/RPMS/$_", $rpm_flags); $x->tag('NAME') => $x; } grep { /\.rpm$/ } readdir RPMS; |
42 |
my $src = $rpms{$rpm}->tag('SOURCERPM'); |
my $src = $rpms{$rpm}->tag('SOURCERPM'); |
43 |
push @sources, $src; |
push @sources, $src; |
44 |
push @sources, $src if ($src =~ s/\.2\.el4\.rf\./\.rf\./); |
push @sources, $src if ($src =~ s/\.2\.el4\.rf\./\.rf\./); |
45 |
|
push @sources, $src if ($src =~ s/\.el4\.rf\./\.rf\./); |
46 |
|
push @sources, $src if ($src =~ s/\.el4\.at\./\.at\./); |
47 |
push @sources, $src if ($src =~ s/\.rf\./\.dag\./); |
push @sources, $src if ($src =~ s/\.rf\./\.dag\./); |
48 |
|
|
49 |
my $found = 0; |
my $found = 0; |
58 |
{ |
{ |
59 |
my $fromfile = $repos{$source} . "/$source"; |
my $fromfile = $repos{$source} . "/$source"; |
60 |
$fromfile =~ s#//#/#g; |
$fromfile =~ s#//#/#g; |
61 |
`ln -s $fromfile /builds/SRPMS/`; |
`cp --preserve=timestamps $fromfile /builds/SRPMS/`; |
62 |
$found = 1; |
$found = 1; |
63 |
last; |
last; |
64 |
} |
} |