From effc8b8e4efe8a834dcd226ae9e36eecde681323 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 6 Aug 2003 13:35:43 +0000 Subject: Add --nosource and --deps --- rpmbuildupdate | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'rpmbuildupdate') 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 : Specify SRPMS path\n"; print " --src : Build new version from this source RPM\n"; print " --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; } -- cgit v1.2.1