From 693bb6d570f758905d757c02ee8f41d076f1299b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 3 Sep 2007 15:37:52 +0000 Subject: (easy_add_callback) fix erasing all existing media when adding new media on first startup of rpmdrake (#30883) --- Rpmdrake/edit_urpm_sources.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Rpmdrake/edit_urpm_sources.pm') 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$/; -- cgit v1.2.1