summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/package.bbclass7
-rw-r--r--classes/package_deb.bbclass2
-rw-r--r--classes/package_ipk.bbclass2
-rw-r--r--classes/package_rpm.bbclass4
-rw-r--r--classes/package_tar.bbclass5
5 files changed, 6 insertions, 14 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 1dc26fdc54..4dfd5f0444 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -4,13 +4,6 @@
PKGDEST = "${WORKDIR}/install"
-def build_package_revision(d):
- import bb
- file_pr = bb.data.getVar('PR', d, True)
- distro_pr = bb.data.getVar('DISTRO_PR', d, True) or ""
- return "%s%s" % (file_pr, distro_pr)
-
-
def legitimize_package_name(s):
"""
Make sure package names are legitimate strings
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index 64d8d4ed5d..6d4abaf5d0 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -131,7 +131,7 @@ python do_package_deb () {
pass
if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
from bb import note
- note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), build_package_revision(localdata)))
+ note("Not creating empty archive for %s-%s" % (pkg, bb.data.expand('${PV}-${PR}${DISTRO_PR}', localdata, True)))
bb.utils.unlockfile(lf)
continue
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index e0636eef70..29ee32788f 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -178,7 +178,7 @@ python do_package_ipk () {
pass
if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1":
from bb import note
- note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), build_package_revision(localdata)))
+ note("Not creating empty archive for %s-%s" % (pkg, bb.data.expand('${PV}-${PR}${DISTRO_PR}', localdata, True)))
bb.utils.unlockfile(lf)
continue
diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass
index e10ad90ffc..f0055a1e63 100644
--- a/classes/package_rpm.bbclass
+++ b/classes/package_rpm.bbclass
@@ -40,7 +40,7 @@ python write_specfile() {
pass
if not files:
from bb import note
- note("Not creating empty archive for %s-%s-%s" % (bb.data.getVar('PKG',d, 1), bb.data.getVar('PV', d, 1), build_package_revision(d)))
+ note("Not creating empty archive for %s" % (bb.data.expand('${PKG}-${PV}-${PR}${DISTRO_PR}', d, True))
return
# output .spec using this metadata store
@@ -57,7 +57,7 @@ python write_specfile() {
if out_vartranslate[var][0] == "%":
continue
fd.write("%s\t: %s\n" % (out_vartranslate[var], bb.data.getVar(var, d)))
- fd.write("Release\t: %s\n" % build_package_revision(d))
+ fd.write("Release\t: %s\n" % bb.data.expand('${PR}${DISTRO_PR}', d, True)
fd.write("Summary\t: .\n")
for var in out_vartranslate.keys():
diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass
index 9ce0c98b8b..e5d3f74126 100644
--- a/classes/package_tar.bbclass
+++ b/classes/package_tar.bbclass
@@ -5,8 +5,7 @@ IMAGE_PKGTYPE ?= "tar"
python package_tar_fn () {
import os
from bb import data
- fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (bb.data.getVar('PKG', d), bb.data.getVar('PV', d), build_package_revision(d)))
- fn = bb.data.expand(fn, d)
+ fn = os.path.join(bb.data.getVar('DEPLOY_DIR_TAR', d, True), bb.data.expand('${PKG}-${PV}-${PR}${DISTRO_PR}.tar.gz', d, True))
bb.data.setVar('PKGFN', fn, d)
}
@@ -86,7 +85,7 @@ python do_package_tar () {
os.chdir(root)
from glob import glob
if not glob('*'):
- bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), build_package_revision(localdata)))
+ bb.note("Not creating empty archive for %s" % (pkg, bb.data.expand('${PV}-${PR}${DISTRO_PR}', d, True)))
continue
ret = os.system("tar -czf %s %s" % (tarfn, '.'))
if ret != 0: