aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Danjou <jdanjou@mandriva.org>2003-08-06 13:35:43 +0000
committerJulien Danjou <jdanjou@mandriva.org>2003-08-06 13:35:43 +0000
commiteffc8b8e4efe8a834dcd226ae9e36eecde681323 (patch)
treed23b116d793bb2ed8e6fe37f7f9a2f2893dbb5b1
parentd94172dc191e03a15ea288ae10856783a1487745 (diff)
downloadbootsplash-effc8b8e4efe8a834dcd226ae9e36eecde681323.tar
bootsplash-effc8b8e4efe8a834dcd226ae9e36eecde681323.tar.gz
bootsplash-effc8b8e4efe8a834dcd226ae9e36eecde681323.tar.bz2
bootsplash-effc8b8e4efe8a834dcd226ae9e36eecde681323.tar.xz
bootsplash-effc8b8e4efe8a834dcd226ae9e36eecde681323.zip
Add --nosource and --deps
-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;
}