aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/edit_urpm_sources.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake/edit_urpm_sources.pm')
-rw-r--r--Rpmdrake/edit_urpm_sources.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 4c3ee4b3..dc5cf179 100644
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -97,10 +97,8 @@ sub remove_row {
sub easy_add_callback() {
# when called on early init by rpmdrake
- if (!$urpm) {
- $urpm = urpm->new;
- urpm::media::read_config($urpm);
- }
+ require Rpmdrake::pkg;
+ $urpm ||= Rpmdrake::pkg::open_urpmi_db();
my $arch = arch();
$arch = 'i586' if $arch =~ /^i.86$/;