summaryrefslogtreecommitdiff
path: root/portato/backend
diff options
context:
space:
mode:
Diffstat (limited to 'portato/backend')
-rw-r--r--portato/backend/flags.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index fc99651..b151665 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -151,6 +151,7 @@ def generate_path (cpv, exp):
- $(cat-1): first part of the category (e.g. "app")
- $(cat-2): second part of the category
- $(pkg) : name of the package
+ - $(version) : version of the package
@param cpv: the cpv of the current package
@type cpv: string (cat/pkg-ver)
@@ -161,10 +162,13 @@ def generate_path (cpv, exp):
if exp.find("$(") != -1:
cat, pkg, ver, rev = system.split_cpv(cpv)
+ if rev != "r0":
+ ver = "%s-%s" % (ver, rev)
exp = exp.replace("$(cat)",cat).\
replace("$(pkg)",pkg).\
replace("$(cat-1)",cat.split("-")[0]).\
- replace("$(cat-2)",cat.split("-")[1])
+ replace("$(cat-2)",cat.split("-")[1]).\
+ replace("$(version)",ver)
return exp
### USE FLAG PART ###