aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/formatting.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-24 16:14:17 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-24 16:14:17 +0000
commit749da7f388db2f6f37e2b238f34aa4b39384cb4a (patch)
tree382f795d186eb4fa886784c85fa0f6016061de30 /Rpmdrake/formatting.pm
parent44ba14a0d18d9802658a468b97963297cf154344 (diff)
downloadrpmdrake-749da7f388db2f6f37e2b238f34aa4b39384cb4a.tar
rpmdrake-749da7f388db2f6f37e2b238f34aa4b39384cb4a.tar.gz
rpmdrake-749da7f388db2f6f37e2b238f34aa4b39384cb4a.tar.bz2
rpmdrake-749da7f388db2f6f37e2b238f34aa4b39384cb4a.tar.xz
rpmdrake-749da7f388db2f6f37e2b238f34aa4b39384cb4a.zip
(version_release) factorize some code
also needed for next commit
Diffstat (limited to 'Rpmdrake/formatting.pm')
-rw-r--r--Rpmdrake/formatting.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm
index 6f581b9e..7b4c0917 100644
--- a/Rpmdrake/formatting.pm
+++ b/Rpmdrake/formatting.pm
@@ -49,7 +49,9 @@ our @EXPORT = qw(
pkg2medium
rpm_description
split_fullname
- urpm_name);
+ urpm_name
+ version_release
+ );
# from rpmtools, #37482:
@@ -90,6 +92,11 @@ sub my_fullname {
"$name-$version-$release";
}
+sub version_release {
+ my (undef, $version, $release) = $_[0]->fullname;
+ "$version-$release";
+}
+
sub urpm_name {
return '?-?-?.?' unless ref $_[0];
scalar $_[0]->fullname;