diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-09-03 15:57:41 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-09-03 15:57:41 +0000 |
commit | e44bbadff134db683ad9bc5f9df1d8ddba095498 (patch) | |
tree | fc11d2fffd156117235681bdfe8dd95ac8a943ae | |
parent | e735fbff1b7257dac4509b52ac3114e7f0c74b79 (diff) | |
download | rpmdrake-e44bbadff134db683ad9bc5f9df1d8ddba095498.tar rpmdrake-e44bbadff134db683ad9bc5f9df1d8ddba095498.tar.gz rpmdrake-e44bbadff134db683ad9bc5f9df1d8ddba095498.tar.bz2 rpmdrake-e44bbadff134db683ad9bc5f9df1d8ddba095498.tar.xz rpmdrake-e44bbadff134db683ad9bc5f9df1d8ddba095498.zip |
(easy_add_callback) fix erasing all existing media when adding new
media on first startup of rpmdrake (#30883)
-rwxr-xr-x | Rpmdrake/edit_urpm_sources.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 3c0d52e9..f2a14adc 100755 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -70,8 +70,13 @@ sub remove_row { } sub easy_add_callback() { + # when called on early init by rpmdrake + if (!$urpm) { + $urpm = urpm->new; + urpm::media::read_config($urpm); + } + #- cooker and community don't have update sources - $urpm ||= urpm->new; # when called on early init by rpmdrake my $arch = arch(); $arch = 'i586' if $arch =~ /^i.86$/; my $want_base_distro = distro_type(0) eq 'updates' ? interactive_msg( |