summaryrefslogtreecommitdiffstats
path: root/urpm/args.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-18 17:12:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-18 17:12:18 +0000
commit4770bc86abc884603500987585d34f85acfcc06b (patch)
tree8884fbabdba83b427f2d079f4331f0010a2341c1 /urpm/args.pm
parent66ab26598afa8239868d32b5118304c629dafe81 (diff)
downloadurpmi-4770bc86abc884603500987585d34f85acfcc06b.tar
urpmi-4770bc86abc884603500987585d34f85acfcc06b.tar.gz
urpmi-4770bc86abc884603500987585d34f85acfcc06b.tar.bz2
urpmi-4770bc86abc884603500987585d34f85acfcc06b.tar.xz
urpmi-4770bc86abc884603500987585d34f85acfcc06b.zip
- urpmi:
o --buildrequires deprecate --src, --src is kept for compatibility but its behaviour is changed a little (it doesn't download src.rpm anymore) ie implement what i suggested on cooker mailing list: Date: Thu, 15 Nov 2007 18:21:32 +0100 Subject: urpmi --src issues, suggesting replacing --src with --buildrequires current situation: % urpmi /xxx/foo.src.rpm #=> installs foo.src.rpm buildrequires % urpmi --install-src foo bar #=> downloads foo.src.rpm bar.src.rpm and "rpm -i" % urpmi --help | grep -- --src --src, -s - next package is a source package. % urpmi --src foo #=> urpmi says it will install foo buildrequires + foo.src.rpm #=> in fact, it only installs foo buildrequires weird cases in current urpmi: % urpmi --src foo bar #=> equiv to "urpmi --src foo ; urpmi bar" % urpmi foo --src bar #=> equiv to "urpmi --src foo bar" above :-( % urpmi --src foo --src bar #=> equiv to "urpmi --src foo bar" :-( suggestions: 1) we could make --src a global option: % urpmi --src foo bar #=> would install buildrequires of foo.src.rpm and bar.src.rpm cons: it breaks compatibility (though i'm quite sure noone uses the previous behaviour) 2) deprecate --src, introduce with --buildrequires: % urpmi --buildrequires foo bar #=> would install buildrequires of foo.src.rpm and bar.src.rpm 3) when doing "urpmi /xxx/foo.src.rpm", warn the user that it should use either "--install-src" or "--buildrequires", and that urpmi is defaulting to "--buildrequires" 2) and 3) are implemented now
Diffstat (limited to 'urpm/args.pm')
-rw-r--r--urpm/args.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index b676a891..17f02ce0 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -83,7 +83,9 @@ my %options_spec = (
'split-level=s' => sub { $urpm->{options}{'split-level'} = $_[1] },
'split-length=s' => sub { $urpm->{options}{'split-length'} = $_[1] },
'fuzzy!' => sub { $urpm->{options}{fuzzy} = $_[1] },
- 'src|s' => \$::src,
+ 'src|s' => sub { $urpm->{error}("option --src is deprecated, use --buildrequires instead (nb: it doesn't download src.rpm anymore)");
+ $options{buildrequires} = 1 },
+ 'buildrequires' => \$options{buildrequires},
'install-src' => \$::install_src,
clean => sub { $::clean = 1; $::noclean = 0 },
noclean => sub {