diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-03-14 08:24:19 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-03-14 08:24:19 +0000 |
commit | b1c1355515da02f4b0620080dd6f82f43ca35a75 (patch) | |
tree | 886b1549421a9424081084296604aaa24bcc938b | |
parent | 2dc6dc0a9e5fe95fa9139f734a0350e2f36508a6 (diff) | |
download | urpmi-b1c1355515da02f4b0620080dd6f82f43ca35a75.tar urpmi-b1c1355515da02f4b0620080dd6f82f43ca35a75.tar.gz urpmi-b1c1355515da02f4b0620080dd6f82f43ca35a75.tar.bz2 urpmi-b1c1355515da02f4b0620080dd6f82f43ca35a75.tar.xz urpmi-b1c1355515da02f4b0620080dd6f82f43ca35a75.zip |
- urpmi:
o never suggest --install-src for spec file (#38876)
o do not allow "urpmi --install-src foo.spec"
-rw-r--r-- | NEWS | 4 | ||||
-rwxr-xr-x | urpmi | 12 |
2 files changed, 15 insertions, 1 deletions
@@ -1,3 +1,7 @@ +- urpmi: + o never suggest --install-src for spec file (#38876) + o do not allow "urpmi --install-src foo.spec" + Version 5.12 - 11 March 2008, by Thierry Vignaud - gurpmi: @@ -192,11 +192,14 @@ along with --bug.\n"); usage(); } +my @spec_files; # Process the rest of the arguments foreach (@ARGV) { if (/\.(?:rpm|spec)$/) { - if (/\.(?:src\.rpm|spec)$/) { + if (/\.src\.rpm$/) { push @src_files, $_; + } elsif (/\.spec$/) { + push @spec_files, $_; } else { push @files, untaint($_); } @@ -213,10 +216,17 @@ if ($options{buildrequires}) { #- use install_src to promote all names as src package. if ($install_src) { @files and $urpm->{fatal}(1, N("You can't install binary rpm files when using --install-src")); + @spec_files and $urpm->{fatal}(1, N("You can't install spec files")); push @src_names, @names; @names = (); #- allow to use --install-src as a non-root user $options{nolock} = 1; +} elsif (@spec_files) { + if (!$options{buildrequires}) { + $urpm->{error}(N("defaulting to --buildrequires")); + $options{buildrequires} = 1; + } + push @src_files, @spec_files; } elsif (@src_files && !$options{buildrequires}) { $urpm->{error}(N("please use --buildrequires or --install-src, defaulting to --buildrequires")); $options{buildrequires} = 1; |