aboutsummaryrefslogtreecommitdiffstats
path: root/rpmbuildupdate
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2003-07-11 06:55:51 +0000
committerFrederic Lepied <flepied@mandriva.com>2003-07-11 06:55:51 +0000
commit52398fc78ba15ac10c68742bf5f47685a9fdb9f6 (patch)
tree38945f96663aab53d423848a1546e15a8d02f8e3 /rpmbuildupdate
parent371c26d6fd6bd75dc25ad7e7553fe8e2ef5c51c0 (diff)
downloadbootsplash-52398fc78ba15ac10c68742bf5f47685a9fdb9f6.tar
bootsplash-52398fc78ba15ac10c68742bf5f47685a9fdb9f6.tar.gz
bootsplash-52398fc78ba15ac10c68742bf5f47685a9fdb9f6.tar.bz2
bootsplash-52398fc78ba15ac10c68742bf5f47685a9fdb9f6.tar.xz
bootsplash-52398fc78ba15ac10c68742bf5f47685a9fdb9f6.zip
put the default mount point like on the compilation cluster.
use %_topdir to find the root of the rpm tree. use bzme to transform .gz in .bz2.
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-xrpmbuildupdate39
1 files changed, 20 insertions, 19 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index 14a595e..057cb61 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -15,7 +15,7 @@
use strict;
use AppConfig;
-my $mount_point = "/mnt/distrib/cooker/SRPMS/";
+my $mount_point = "/mnt/BIG/distrib/cooker/SRPMS/";
my $defaultrelease = "1mdk";
my %config;
@@ -47,17 +47,22 @@ sub build
closedir(MP);
if($found == 0) { print "Package $pkg has no source, skipping.\n\n"; return; }
-
- system("/usr/sbin/urpmi --auto --force ".$mount_point.$pkgrpm);
- #{ print "Error while urpmi $pkgrpm\n"; return; };
- wait;
-
- system("/usr/sbin/urpmi --install-src --force ".$mount_point.$pkgrpm);
- #{ print "Error while urpmi --install-src $pkgrpm\n"; return; }
- wait;
-
-
- chdir "/usr/src/RPM/SOURCES" or die "Unable to chdir to /usr/src/RPM/SOURCES";
+
+ if (0) {
+ system("rpm -i $pkgrpm");
+ } else {
+ system("/usr/sbin/urpmi --auto --force ".$mount_point.$pkgrpm);
+ #{ print "Error while urpmi $pkgrpm\n"; return; };
+ wait;
+
+ system("/usr/sbin/urpmi --install-src --force ".$mount_point.$pkgrpm);
+ #{ print "Error while urpmi --install-src $pkgrpm\n"; return; }
+ wait;
+ }
+
+ my $top = `rpm --eval '%_topdir'`;
+ chop($top);
+ chdir("$top/SOURCES") or die "Unable to chdir to $top/SOURCES";
$found = 0;
@@ -122,14 +127,10 @@ sub build
# If gz was downloaded, recompressing it in bz2
if(-f $basename)
{
- print "Gunzipping $basename... ";
- system("gunzip ".$basename);
- print "done\n";
- $basename =~ s/\.gz$//;
print "Bzipping $basename... ";
- system("bzip2 ".$basename);
+ system("bzme ".$basename);
print "done\n";
- $basename .= ".bz2";
+ $basename =~ s/bz2/gz/;
}
}
@@ -140,7 +141,7 @@ sub build
if(!$found) { print "Unable to download file: URL is not valid ! :-/\n\n"; return; }
- system("rpmbuild -ba ../SPECS/".$pkg.".spec");
+ system("rpm -ba ../SPECS/".$pkg.".spec");
wait;
}