aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-07-04 12:18:28 +0200
committerAngelo Naselli <anaselli@linux.it>2015-07-04 12:18:28 +0200
commita8085b6dbbf6743b691b5b57a5829d39d932d845 (patch)
treee0aaff1e2eca888ced5b9ec9559b2efbb41319b6 /lib
parentcb6c565988e232949f590d63ebf225f708092f37 (diff)
downloadcolin-keep-a8085b6dbbf6743b691b5b57a5829d39d932d845.tar
colin-keep-a8085b6dbbf6743b691b5b57a5829d39d932d845.tar.gz
colin-keep-a8085b6dbbf6743b691b5b57a5829d39d932d845.tar.bz2
colin-keep-a8085b6dbbf6743b691b5b57a5829d39d932d845.tar.xz
colin-keep-a8085b6dbbf6743b691b5b57a5829d39d932d845.zip
Fixed object call
Diffstat (limited to 'lib')
-rw-r--r--lib/ManaTools/Shared/urpmi_backend/tools.pm20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/ManaTools/Shared/urpmi_backend/tools.pm b/lib/ManaTools/Shared/urpmi_backend/tools.pm
index ad037b6..05768c9 100644
--- a/lib/ManaTools/Shared/urpmi_backend/tools.pm
+++ b/lib/ManaTools/Shared/urpmi_backend/tools.pm
@@ -302,7 +302,8 @@ sub find_installed_fullname {
#=============================================================
sub is_mageia {
my $self = shift;
- cat_('/etc/release') =~ /Mageia/;
+
+ return cat_('/etc/release') =~ /Mageia/;
}
#=============================================================
@@ -319,9 +320,10 @@ sub is_mageia {
sub vendor {
my $self = shift;
- is_mageia() ? "mageia" : "mandriva";
+ return $self->is_mageia() ? "mageia" : "mandriva";
}
+
#=============================================================
=head2 get_package_id
@@ -365,11 +367,16 @@ sub get_package_id {
#=============================================================
sub pkg2medium {
my ($self, $p, $urpm) = @_;
+
return if ref($p) ne 'URPM::Package';
- return { name => $self->loc()->N("None (installed)") } if !defined($p->id); # if installed
+ return {
+ name => $self->loc->N_("None (installed)")
+ } if !defined($p->id); # if installed
- return URPM::pkg2media($urpm->{media}, $p) || { name => $self->loc()->N("Unknown"), fake => 1 };
+ return URPM::pkg2media($urpm->{media}, $p) || {
+ name => $self->loc->N("Unknown"), fake => 1
+ };
}
#=============================================================
@@ -393,7 +400,7 @@ sub fullname_to_package_id {
chomp($pkg_string);
if ($pkg_string =~ /^(.*)-([^-]*)-([^-]*)\.([^\.]*)$/) {
# TODO NOTE check package kit backend it seems the urpm package_id is "name;varsion-release;arch;vendor"
- return join(';', $1, "$2-$3", $4, vendor());
+ return join(';', $1, "$2-$3", $4, $self->vendor());
}
}
@@ -484,4 +491,5 @@ sub get_package_upgrade {
}
-1; \ No newline at end of file
+1;
+