diff options
-rwxr-xr-x | urpmi | 7 | ||||
-rw-r--r-- | urpmi.spec | 6 |
2 files changed, 10 insertions, 3 deletions
@@ -33,6 +33,7 @@ my $auto = 0; my $auto_select = 0; my $force = 0; my $X = 0; +my $WID = 0; my $all = 0; my $complete = 0; my $minimal = 1; @@ -83,6 +84,8 @@ for (@ARGV) { /^--auto-select$/ and do { $auto_select = 1; $minimal = 0; next }; /^--force$/ and do { $force = 1; next }; /^--X$/ and do { $X = 1; next }; + /^--WID=(.*)$/ and do { $WID = $1; next }; + /^--WID$/ and do { push @nextargv, \$WID; next }; /^--best-output$/ and do { $X ||= $ENV{DISPLAY} && system('/usr/X11R6/bin/xtest', '') == 0; next }; /^--comment$/ and do { push @nextargv, undef; next }; /^-(.*)$/ and do { foreach (split //, $1) { @@ -253,7 +256,7 @@ unless ($local_sources || $list) { exit 1; } -my @sources = $urpm->upload_source_packages($local_sources, $list, 'force_local', sub { +my @sources = $urpm->upload_source_packages($local_sources, $list, ($X ? '' : 'force_local'), sub { my $msg = sprintf(_("Please insert the medium named \"%s\" on device [%s]"), @_); my $msg2 = _("Press enter when it's done..."); if ($X) { @@ -283,7 +286,7 @@ sub install { printf SAVEOUT sprintf(_("installing %s\n"), join(' ', @_)); log_it(scalar localtime, " @_\n"); $urpm->{log}("starting installing packages"); - system($X ? "grpmi" : ("rpm", $rpm_opt), @_); + system($X ? ("grpmi", $WID ? ("--WID=$WID") : ()) : ("rpm", $rpm_opt), @_); if ($?) { message(_("Installation failed")); $X and exit 1; #- grpmi handles --nodeps and --force by itself @@ -2,7 +2,7 @@ Name: urpmi Version: 1.5 -Release: 25mdk +Release: 26mdk License: GPL Source0: %{name}.tar.bz2 Summary: User mode rpm install @@ -114,6 +114,10 @@ autoirpm.uninstall %changelog +* Tue Mar 27 2001 François Pons <fpons@mandrakesoft.com> 1.5-26mdk +- added --WID=id +- let grpmi make the upload of packages. + * Mon Mar 26 2001 François Pons <fpons@mandrakesoft.com> 1.5-25mdk - sort list file so that rpm are sorted when installed. - increase speed for --auto-select: implies -M by default. |