aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-03 15:37:52 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-03 15:37:52 +0000
commit693bb6d570f758905d757c02ee8f41d076f1299b (patch)
tree0023a6c8bde08b423c9b7deec165e47bcd0b8c6e /Rpmdrake
parent667c06d4482b1244f515a0cf5a926f20c60e2d27 (diff)
downloadrpmdrake-693bb6d570f758905d757c02ee8f41d076f1299b.tar
rpmdrake-693bb6d570f758905d757c02ee8f41d076f1299b.tar.gz
rpmdrake-693bb6d570f758905d757c02ee8f41d076f1299b.tar.bz2
rpmdrake-693bb6d570f758905d757c02ee8f41d076f1299b.tar.xz
rpmdrake-693bb6d570f758905d757c02ee8f41d076f1299b.zip
(easy_add_callback) fix erasing all existing media when adding new
media on first startup of rpmdrake (#30883)
Diffstat (limited to 'Rpmdrake')
-rwxr-xr-xRpmdrake/edit_urpm_sources.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 9073815e..44253544 100755
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -96,7 +96,12 @@ sub remove_row {
}
sub easy_add_callback() {
- $urpm ||= urpm->new; # when called on early init by rpmdrake
+ # 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
my $arch = arch();
$arch = 'i586' if $arch =~ /^i.86$/;