aboutsummaryrefslogtreecommitdiffstats
path: root/rpmbuildupdate
diff options
context:
space:
mode:
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-xrpmbuildupdate36
1 files changed, 29 insertions, 7 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index 24035b0..8e7bef5 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -66,14 +66,20 @@ sub build
}
if ($config{src})
- { system("rpm -ivh $pkgrpm"); }
- else
{
- system("sudo /usr/sbin/urpmi --auto --force ".$config{srpms}."/".$pkgrpm);
- wait;
- system("/usr/sbin/urpmi --install-src --force ".$config{srpms}."/".$pkgrpm);
- }
- wait;
+ system("rpm -ivh $pkgrpm");
+ wait;
+ }
+ elsif($config{deps})
+ {
+ system("sudo /usr/sbin/urpmi --auto --force ".$config{srpms}."/".$pkgrpm);
+ wait;
+ }
+ elsif(!$config{nosource})
+ {
+ system("/usr/sbin/urpmi --install-src --force ".$config{srpms}."/".$pkgrpm);
+ wait;
+ }
my $top = `rpm --eval '%_topdir'`;
chomp($top);
@@ -246,12 +252,25 @@ sub parse_argv
DEFAULT => "/mnt/BIG/distrib/rawhide/SRPMS/SRPMS/",
ARGCOUNT => AppConfig::ARGCOUNT_ONE }
);
+
+ $conf->define("deps",
+ { ALIAS => "d",
+ DEFAULT => 0,
+ ARGCOUNT => AppConfig::ARGCOUNT_NONE }
+ );
+
+ $conf->define("nosource",
+ { ALIAS => "n",
+ DEFAULT => 0,
+ ARGCOUNT => AppConfig::ARGCOUNT_NONE }
+ );
$conf->args();
$config{rpmmon} = $conf->get("rpmmon");
$config{srpms} = $conf->get("srpms");
$config{src} = $conf->get("src");
$config{release} = $conf->get("release");
+ $config{nosource} = $conf->get("nosource");
$config{rawhide} = $conf->get("rawhide");
}
@@ -268,6 +287,9 @@ sub usage
print " --srpms <path_to_srpms>: Specify SRPMS path\n";
print " --src <src.rpm file> <new version>: Build new version from this source RPM\n";
print " --release <mdk_release>: Release version of package (default: 1mdk)\n";
+ print " --deps: Install builds dependecies\n";
+ print " --nosource: Do not install source from (urpmi x.src.rpm)\n";
+
exit 0;
}