diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-08-07 17:21:02 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-08-07 17:21:02 +0000 |
commit | c09ca331a159b33ed482d8da048863732e66477e (patch) | |
tree | f93c66102e573bdc816c282f05f25506bbae75cb | |
parent | 42369c07cca8de9d9d2adc808cdc45cef69aaba6 (diff) | |
download | mgaonline-c09ca331a159b33ed482d8da048863732e66477e.tar mgaonline-c09ca331a159b33ed482d8da048863732e66477e.tar.gz mgaonline-c09ca331a159b33ed482d8da048863732e66477e.tar.bz2 mgaonline-c09ca331a159b33ed482d8da048863732e66477e.tar.xz mgaonline-c09ca331a159b33ed482d8da048863732e66477e.zip |
(installUpdates) complete latest commit by running MandrivaUpdate with--urpmi-root if needed
-rwxr-xr-x | mdkapplet | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -36,6 +36,7 @@ use ugtk2 qw(:all); use lib qw(/usr/lib/libDrakX/drakfirsttime); use mdkonline; use Gtk2::Notify '-init', 'mdkapplet'; +use Rpmdrake::open_db; # POSIX unmasks the sigprocmask properly my $sigset = POSIX::SigSet->new; @@ -216,6 +217,7 @@ foreach my $opt (@ARGV) { } } +my $root = Rpmdrake::open_db::fast_open_urpmi_db()->{root}; shouldStart() or die "$localfile should be set to TRUE: please use --force or -f option to launch applet\n"; @@ -286,7 +288,8 @@ sub installUpdates() { return if $mdv_update_pid; my $oldmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile); logIt(N_("Launching MandrivaUpdate\n")); - $mdv_update_pid = fork_exec('MandrivaUpdate', '--no-media-update', '--no-confirmation', '--no-splash'); + $mdv_update_pid = fork_exec('MandrivaUpdate', '--no-media-update', '--no-confirmation', '--no-splash', + if_($root, "--urpmi-root=$root")); my $newmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile); restart_applet() if $newmd5 ne $oldmd5; silentCheck(); gtkflush(); @@ -321,7 +324,6 @@ sub silentCheck() { require urpm; require urpm::lock; # so that get_inactive_backport_media() doesn't vivify $urpm->{media}: - require Rpmdrake::open_db; my $urpm = Rpmdrake::open_db::fast_open_urpmi_db(); { local $urpm->{fatal} = sub { |