summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-08-07 14:08:14 +0000
committerThierry Vignaud <tv@mandriva.org>2008-08-07 14:08:14 +0000
commit64d043ec0daff2942edf380add5a000d9027cc97 (patch)
treecd0ae56e2dbd5ee8aad1a88d79c4514ef28fc5d2
parent31278f90353d545cc4fc4d7f80273a7a0f9e5a3f (diff)
downloadurpmi-64d043ec0daff2942edf380add5a000d9027cc97.tar
urpmi-64d043ec0daff2942edf380add5a000d9027cc97.tar.gz
urpmi-64d043ec0daff2942edf380add5a000d9027cc97.tar.bz2
urpmi-64d043ec0daff2942edf380add5a000d9027cc97.tar.xz
urpmi-64d043ec0daff2942edf380add5a000d9027cc97.zip
(configure_urpm) parse command line when initializing urpmi, thus
fixing --urpmi-root
-rw-r--r--NEWS2
-rwxr-xr-xgurpmi28
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 924ffaf4..d77db4c2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- gurpmi
+ o fix/manage --urpmi-root
- urpme
o add --justdb
o sort the list of orphans
diff --git a/gurpmi2 b/gurpmi2
index 48fe89ca..f3f9c235 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -111,8 +111,12 @@ my ($rpm_lock, $urpmi_lock);
#- Creates and configure an urpm object for this application to use.
sub configure_urpm() {
- my $urpm = urpm->new;
- $urpm->get_global_options;
+ my $urpm;
+ {
+ local @ARGV = @ARGV;
+ $urpm = urpm->new_parse_cmdline;
+ }
+
$urpm->{fatal} = sub {
Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'error', 'ok', Locale::gettext::iconv($_[1], undef, 'UTF-8'))->run;
quit();