summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-12-17 15:23:28 +0000
committerThierry Vignaud <tv@mageia.org>2012-12-17 15:23:28 +0000
commitdfcd07d4771ce05470912fa31f70627fc0257043 (patch)
tree8f970c20e19c63296368e3a4a73222b120e575e2
parent62fe451929b2c0506f97e44ab81d92c09e3a5968 (diff)
downloadurpmi-dfcd07d4771ce05470912fa31f70627fc0257043.tar
urpmi-dfcd07d4771ce05470912fa31f70627fc0257043.tar.gz
urpmi-dfcd07d4771ce05470912fa31f70627fc0257043.tar.bz2
urpmi-dfcd07d4771ce05470912fa31f70627fc0257043.tar.xz
urpmi-dfcd07d4771ce05470912fa31f70627fc0257043.zip
fix retrieving rpm version with beta versions
-rw-r--r--NEWS1
-rw-r--r--urpm/select.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 30640393..3ff7401c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- library:
o do not show empty information from README* with --justdb
+ o fix retrieving rpm version with beta versions
Version 7.14 - 13 December 2012, by Thierry Vignaud
diff --git a/urpm/select.pm b/urpm/select.pm
index 553353d5..d65c9020 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -718,7 +718,7 @@ sub translate_why_removed_one {
}
sub _libdb_version { $_[0] =~ /libdb-(\S+)\.so/ ? version->new("v$1") : () }
-sub _rpm_version() { `rpm --version` =~ /version ([0-9.]+)$/ ? version->new("v$1") : () }
+sub _rpm_version() { `rpm --version` =~ /version ([0-9.]+)(?:-beta.*)$/ ? version->new("v$1") : () }
sub should_we_migrate_back_rpmdb_db_version {
my ($urpm, $state) = @_;