diff options
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-x | rpmbuildupdate | 39 |
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; } |