aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrpmbuildupdate33
1 files changed, 24 insertions, 9 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index d14b067..a75a2b9 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -64,15 +64,16 @@ sub build
if($pkgrpm_basename =~ m|^($pkge)-([^-]+)-([^-]+)\.[^\.]+\.rpm|)
{ $version = $2; $release = $3; $found = 1;}
}
-
- if($config{src})
+
+ if($config{deps})
{
- system("rpm -ivh $pkgrpm");
+ print("sudo /usr/sbin/urpmi --auto --force ".$config{srpms}."/".$pkgrpm);
wait;
}
- elsif($config{deps})
+
+ if($config{src})
{
- system("sudo /usr/sbin/urpmi --auto --force ".$config{srpms}."/".$pkgrpm);
+ system("rpm -ivh $pkgrpm");
wait;
}
elsif(!$config{nosource})
@@ -144,10 +145,23 @@ sub build
closedir(MP);
- system("sudo /usr/sbin/urpmi --auto --force ".$config{rawhide}."/".$pkgrpmrh);
- wait;
- system("/usr/sbin/urpmi --install-src --force ".$config{rawhide}."/".$pkgrpmrh);
- wait;
+ if($config{deps})
+ {
+ system("sudo /usr/sbin/urpmi --auto --force ".$config{rawhide}."/".$pkgrpmrh);
+ wait;
+ }
+
+ if($config{src})
+ {
+ system("rpm -ivh $pkgrpmrh");
+ wait;
+ }
+ elsif(!$config{nosource})
+ {
+ system("/usr/sbin/urpmi --install-src --force ".$config{rawhide}."/".$pkgrpmrh);
+ wait;
+ }
+
# Reinstall source to restore .spec file
#system("/usr/sbin/urpmi --install-src --force ".$config{srpms}."/".$pkgrpm);
#wait;
@@ -267,6 +281,7 @@ sub parse_argv
$conf->args();
$config{rpmmon} = $conf->get("rpmmon");
+ $config{deps} = $conf->get("deps");
$config{srpms} = $conf->get("srpms");
$config{src} = $conf->get("src");
$config{release} = $conf->get("release");