diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:52:43 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-08 18:52:43 +0000 |
commit | c9a5de787892b261ea6435cdaf7d26955f3a81a7 (patch) | |
tree | dfd7063ba4aaa3b307b6ca1d1d42d5f69708e8f5 /urpm/select.pm | |
parent | 3ad655fecd067aa71ce080175cebc90cfc76421a (diff) | |
download | urpmi-c9a5de787892b261ea6435cdaf7d26955f3a81a7.tar urpmi-c9a5de787892b261ea6435cdaf7d26955f3a81a7.tar.gz urpmi-c9a5de787892b261ea6435cdaf7d26955f3a81a7.tar.bz2 urpmi-c9a5de787892b261ea6435cdaf7d26955f3a81a7.tar.xz urpmi-c9a5de787892b261ea6435cdaf7d26955f3a81a7.zip |
(_libdb_version,_rpm_version,should_we_migrate_back_rpmdb_db_version)
adapt to perl-5.16.0: it looks like 'eval "v..."' no longuer create version objects
Diffstat (limited to 'urpm/select.pm')
-rw-r--r-- | urpm/select.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/urpm/select.pm b/urpm/select.pm index 47b8164d..9c5a95ce 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -665,8 +665,8 @@ sub translate_why_removed_one { $fullname . ($s ? "\n ($s)" : ''); } -sub _libdb_version { $_[0] =~ /libdb-(\S+)\.so/ ? eval "v$1" : () } -sub _rpm_version() { `rpm --version` =~ /version ([0-9.]+)$/ ? eval "v$1" : () } +sub _libdb_version { $_[0] =~ /libdb-(\S+)\.so/ ? version->new("v$1") : () } +sub _rpm_version() { `rpm --version` =~ /version ([0-9.]+)$/ ? version->new("v$1") : () } sub should_we_migrate_back_rpmdb_db_version { my ($urpm, $state) = @_; @@ -674,7 +674,7 @@ sub should_we_migrate_back_rpmdb_db_version { my ($pkg) = urpm::select::selected_packages_providing($urpm, $state, 'rpm') or return; urpm::select::was_pkg_name_installed($state->{rejected}, 'rpm') and return; my ($rooted_librpm_version) = map { _libdb_version($_) } $pkg->requires; # perl_checker: $self = revision - my $rooted_rpm_version = eval "v" . $pkg->version; # perl_checker: $self = revision + my $rooted_rpm_version = version->new("v" . $pkg->version); # perl_checker: $self = revision my $urpmi_librpm_version = _libdb_version(scalar `ldd /bin/rpm`); # perl_checker: $self = revision |