aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Youri
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-02-26 10:56:20 +0000
committerOlivier Blin <oblin@mandriva.com>2007-02-26 10:56:20 +0000
commit2563be77e217834d32e46f94bcee448e9240aef3 (patch)
treef69e95827795be54f85673c69d6c4bcd38b1379e /lib/Youri
parent8f754b127c0feae76ad6f8b1d2701d592720cda5 (diff)
downloadmga-youri-submit-2563be77e217834d32e46f94bcee448e9240aef3.tar
mga-youri-submit-2563be77e217834d32e46f94bcee448e9240aef3.tar.gz
mga-youri-submit-2563be77e217834d32e46f94bcee448e9240aef3.tar.bz2
mga-youri-submit-2563be77e217834d32e46f94bcee448e9240aef3.tar.xz
mga-youri-submit-2563be77e217834d32e46f94bcee448e9240aef3.zip
initial Post::CleanRpmsrate module
Diffstat (limited to 'lib/Youri')
-rw-r--r--lib/Youri/Submit/Post/CleanRpmsrate.pm45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/Youri/Submit/Post/CleanRpmsrate.pm b/lib/Youri/Submit/Post/CleanRpmsrate.pm
new file mode 100644
index 0000000..ee11553
--- /dev/null
+++ b/lib/Youri/Submit/Post/CleanRpmsrate.pm
@@ -0,0 +1,45 @@
+# $Id: CleanRpmsrate.pm 115367 2007-01-30 09:47:04Z pixel $
+package Youri::Submit::Post::CleanRpmsrate;
+
+=head1 NAME
+
+Youri::Submit::Post::CleanRpmsrate - calls clean-rpmsrate
+
+=head1 DESCRIPTION
+
+Calls clean-rpmsrate
+
+=cut
+
+use warnings;
+use strict;
+use Carp;
+use base qw/Youri::Submit::Post/;
+
+sub _init {
+}
+
+sub run {
+ my ($self, $repository, $target, $define) = @_;
+ croak "Not a class method" unless ref $self;
+ my $root = $repository->get_install_root();
+ foreach my $arch (@{$repository->get_arch_changed($target)}, 'i586', 'x86_64') {
+ my $rpmsrate = "$root/$target/$arch/media/media_info/rpmsrate";
+ my @media = "$root/$target/$arch/media/main/release";
+ system("cp", "$rpmsrate-raw", "$rpmsrate-new");
+ system("clean-rpmsrate", "$rpmsrate-new", @media);
+ system("mv", "-f", "$rpmsrate-new", $rpmsrate);
+ }
+ return
+}
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2007, Mandriva <blino@mandriva.com>
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
+
+1;
+