diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-06-28 17:47:40 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-06-28 17:47:40 +0200 |
commit | 5664171b47960032972f65528bce17edbb1b9e20 (patch) | |
tree | 55b5b6a627bc04c09bdc74477d2b566b6cd97e64 /lib/AdminPanel | |
parent | e1eab7e3b53a6f61c49ed2d9726bd50e26acee06 (diff) | |
download | colin-keep-5664171b47960032972f65528bce17edbb1b9e20.tar colin-keep-5664171b47960032972f65528bce17edbb1b9e20.tar.gz colin-keep-5664171b47960032972f65528bce17edbb1b9e20.tar.bz2 colin-keep-5664171b47960032972f65528bce17edbb1b9e20.tar.xz colin-keep-5664171b47960032972f65528bce17edbb1b9e20.zip |
Start working on gurpmi.addmedia
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 34581bf..9349894 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 cae9879..86b5e98 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 |