diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-06-30 12:00:57 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-06-30 12:00:57 +0200 |
commit | 6a8c44ff7ac1f94c8987ea1d4301332d99e71fda (patch) | |
tree | 1fa343dac43265a72ab44e28df85b7875e43fe95 | |
parent | 6103628fc64ba9ec2cc6c915477071e3395d7535 (diff) | |
download | colin-keep-6a8c44ff7ac1f94c8987ea1d4301332d99e71fda.tar colin-keep-6a8c44ff7ac1f94c8987ea1d4301332d99e71fda.tar.gz colin-keep-6a8c44ff7ac1f94c8987ea1d4301332d99e71fda.tar.bz2 colin-keep-6a8c44ff7ac1f94c8987ea1d4301332d99e71fda.tar.xz colin-keep-6a8c44ff7ac1f94c8987ea1d4301332d99e71fda.zip |
changed to fully qualified calls
-rw-r--r-- | lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm | 3 | ||||
-rw-r--r-- | lib/AdminPanel/rpmdragora.pm | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm index 9ef5d00..3162805 100644 --- a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm +++ b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm @@ -32,6 +32,7 @@ use AdminPanel::Rpmdragora::open_db; use AdminPanel::Rpmdragora::formatting; use URPM::Signature; use MDK::Common::Math qw(max); +use MDK::Common::File; use urpm::media; use urpm::download; use urpm::lock; @@ -625,7 +626,7 @@ sub proxy_callback { sub parallel_read_sysconf() { my @conf; - foreach (cat_('/etc/urpmi/parallel.cfg')) { + foreach (MDK::Common::File::cat_('/etc/urpmi/parallel.cfg')) { my ($name, $protocol, $command) = /([^:]+):([^:]+):(.*)/ or print STDERR "Warning, unrecognized line in /etc/urpmi/parallel.cfg:\n$_"; my $medias = $protocol =~ s/\(([^\)]+)\)$// ? [ split /,/, $1 ] : []; push @conf, { name => $name, protocol => $protocol, medias => $medias, command => $command }; diff --git a/lib/AdminPanel/rpmdragora.pm b/lib/AdminPanel/rpmdragora.pm index 808bf52..6130e20 100644 --- a/lib/AdminPanel/rpmdragora.pm +++ b/lib/AdminPanel/rpmdragora.pm @@ -34,6 +34,7 @@ use urpm::media; use MDK::Common; use MDK::Common::System; use MDK::Common::String; +use MDK::Common::File; use urpm; use urpm::cfg; use URPM; @@ -116,7 +117,7 @@ use Glib; Locale::gettext::bind_textdomain_codeset('rpmdragora', 'UTF8'); -our $mageia_release = cat_( +our $mageia_release = MDK::Common::File::cat_( -e '/etc/mageia-release' ? '/etc/mageia-release' : '/etc/release' ) || ''; chomp $mageia_release; @@ -213,7 +214,7 @@ our %config = ( sub readconf() { ${$config{$_}{var}} = $config{$_}{default} foreach keys %config; - foreach my $l (cat_($configfile)) { + foreach my $l (MDK::Common::File::cat_($configfile)) { foreach (keys %config) { ${$config{$_}{var}} = [ split ' ', $1 ] if $l =~ /^\Q$_\E(.*)/; } @@ -230,7 +231,7 @@ sub writeconf() { # special case: $no_confirmation->[0] = $::rpmdragora_options{'no-confirmation'}; - output($configfile, map { "$_ " . (ref ${$config{$_}{var}} ? join(' ', @${$config{$_}{var}}) : undef) . "\n" } keys %config); + MDK::Common::File::output($configfile, map { "$_ " . (ref ${$config{$_}{var}} ? join(' ', @${$config{$_}{var}}) : undef) . "\n" } keys %config); } sub getbanner() { @@ -533,7 +534,7 @@ my %t2l = ( #- get distrib release number (2006.0, etc) sub etc_version() { - (my $v) = split / /, cat_('/etc/version'); + (my $v) = split / /, MDK::Common::File::cat_('/etc/version'); return $v; } @@ -770,9 +771,9 @@ sub mirrors { }, ); $res or die N("retrieval of [%s] failed", $file) . "\n"; - return $canceled ? () : cat_($file); + return $canceled ? () : MDK::Common::File::cat_($file); }); - my @mirrors = @{ mirror::list(common::parse_LDAP_namespace_structure(cat_('/etc/product.id')), 'distrib') || [] }; + my @mirrors = @{ mirror::list(common::parse_LDAP_namespace_structure(MDK::Common::File::cat_('/etc/product.id')), 'distrib') || [] }; require timezone; my $tz = ${timezone::read()}{timezone}; foreach my $mirror (@mirrors) { |