diff options
Diffstat (limited to 'lib/AdminPanel')
-rw-r--r-- | lib/AdminPanel/Rpmdragora/init.pm | 4 | ||||
-rw-r--r-- | lib/AdminPanel/rpmdragora.pm | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/AdminPanel/Rpmdragora/init.pm b/lib/AdminPanel/Rpmdragora/init.pm index 34581bf2..9349894b 100644 --- a/lib/AdminPanel/Rpmdragora/init.pm +++ b/lib/AdminPanel/Rpmdragora/init.pm @@ -33,6 +33,8 @@ use English; BEGIN { $::no_global_argv_parsing = 1 } require urpm::args; +use AdminPanel::Privileges; + use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(init @@ -147,7 +149,7 @@ if ($MODE eq 'remove') { $default_list_mode = 'all_updates'; } -$MODE eq 'update' || $rpmdragora_options{'run-as-root'} and require_root_capability(); +$MODE eq 'update' || $rpmdragora_options{'run-as-root'} and AdminPanel::Privileges::require_root_capability(); $::noborderWhenEmbedded = 1; require AdminPanel::rpmdragora; diff --git a/lib/AdminPanel/rpmdragora.pm b/lib/AdminPanel/rpmdragora.pm index cae9879e..86b5e98f 100644 --- a/lib/AdminPanel/rpmdragora.pm +++ b/lib/AdminPanel/rpmdragora.pm @@ -775,7 +775,7 @@ sub update_sources { callback => sub { $cancel and goto cancel_update; my ($type, $media) = @_; - return if $type !~ /^(?:start|progress|end)$/ && @media && !member($media, @media); + return if $type !~ /^(?:start|progress|end)$/ && @media && !AdminPanel::Shared::member($media, @media); if ($type eq 'failed') { $urpm->{fatal}->(N("Error retrieving packages"), N("It's impossible to retrieve the list of new packages from the media |