diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-09-04 09:39:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-09-04 09:39:49 +0000 |
commit | 7351ce80f21306d67086518e3e9adb915b9b9a68 (patch) | |
tree | ce3c3f887e6e55867a6dd231df860a58f0a95edf | |
parent | e7c972d97770e1bcddb2e25b7ce6093857890a3f (diff) | |
download | rpmdrake-7351ce80f21306d67086518e3e9adb915b9b9a68.tar rpmdrake-7351ce80f21306d67086518e3e9adb915b9b9a68.tar.gz rpmdrake-7351ce80f21306d67086518e3e9adb915b9b9a68.tar.bz2 rpmdrake-7351ce80f21306d67086518e3e9adb915b9b9a68.tar.xz rpmdrake-7351ce80f21306d67086518e3e9adb915b9b9a68.zip |
(easy_add_callback) simplify using open_urpmi_db()
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 6 |
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$/; |