7 |
|
|
8 |
sub compare($$); |
sub compare($$); |
9 |
|
|
10 |
|
my $test_repo = '/releases/7/smedev'; |
11 |
my $releases = 2; |
my $releases = 2; |
12 |
|
|
13 |
my $rpm_flags = RPM2->vsf_nodsa; |
my $rpm_flags = RPM2->vsf_nodsa; |
|
my $test_repo = '/releases/7/smedev'; |
|
14 |
my @repositories = qw( |
my @repositories = qw( |
|
/releases/7/smeupdates/i386/RPMS/ |
|
15 |
/releases/7/smeos/i386/CentOS/RPMS/ |
/releases/7/smeos/i386/CentOS/RPMS/ |
16 |
|
/releases/7/smeupdates/i386/RPMS/ |
17 |
/releases/7/smeupdates-testing/i386/RPMS/ |
/releases/7/smeupdates-testing/i386/RPMS/ |
18 |
|
/releases/7/smeextras/i386/RPMS/ |
19 |
|
/releases/7/smetest/i386/RPMS/ |
20 |
/builds/rpms/RPMS/i386/ |
/builds/rpms/RPMS/i386/ |
21 |
/builds/rpms/RPMS/i586/ |
/builds/rpms/RPMS/i586/ |
22 |
/builds/rpms/RPMS/i686/ |
/builds/rpms/RPMS/i686/ |
56 |
} |
} |
57 |
} |
} |
58 |
|
|
59 |
|
my $changed = 0; |
60 |
my @pushed; |
my @pushed; |
61 |
foreach my $package (sort keys %pushed) |
foreach my $package (sort keys %pushed) |
62 |
{ |
{ |
68 |
unless (grep { ! compare($_, $rpm) } @testing) { |
unless (grep { ! compare($_, $rpm) } @testing) { |
69 |
print "adding ".$rpm->filename."\n"; |
print "adding ".$rpm->filename."\n"; |
70 |
system(qw(cp -a), $rpm->filename, "$test_repo/i386/RPMS/"); |
system(qw(cp -a), $rpm->filename, "$test_repo/i386/RPMS/"); |
71 |
|
$changed++; |
72 |
} |
} |
73 |
} |
} |
74 |
} |
} |
78 |
unless (grep { ! compare($_,$rpm) } @pushed) { |
unless (grep { ! compare($_,$rpm) } @pushed) { |
79 |
print "removing ".$rpm->filename."\n"; |
print "removing ".$rpm->filename."\n"; |
80 |
unlink $rpm->filename; |
unlink $rpm->filename; |
81 |
|
$changed++; |
82 |
} |
} |
83 |
} |
} |
84 |
|
|
85 |
system(qw(rm -rf), "$test_repo/i386/headers", "$test_repo/i386/repodata"); |
if ($changed) { |
86 |
system(qw(createrepo), "$test_repo/i386"); |
system(qw(/builds/bin/linksource -s), "$test_repo/i386/RPMS", '-d', "$test_repo/SRPMS"); |
87 |
system(qw(yum-arch), "$test_repo/i386"); |
system(qw(createrepo), "$test_repo/i386"); |
88 |
|
system(qw(repoview), "$test_repo/i386"); |
89 |
|
} |
90 |
|
|
91 |
sub compare($$) { |
sub compare($$) { |
92 |
my ($a, $b) = @_; |
my ($a, $b) = @_; |