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
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
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
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
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():
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)
}
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: