summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2009-12-11 23:22:42 +0000
committerPhil Blundell <philb@gnu.org>2009-12-11 23:22:42 +0000
commitfb775893cb35b709d20af1afaeb13bbeb5ee4abf (patch)
tree8dfb48d3a3196e7b341acc9922265939be7934b1 /classes
parentb9a72d944e5cce4a96a8207620197ea7d7caa676 (diff)
package, package_ipk: add PKGV, to PV as PKG is to PN.
Diffstat (limited to 'classes')
-rw-r--r--classes/package.bbclass18
-rw-r--r--classes/package_ipk.bbclass4
2 files changed, 16 insertions, 6 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 4196135710..062f782129 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -5,6 +5,12 @@
PKGD = "${WORKDIR}/package"
PKGDEST = "${WORKDIR}/packages-split"
+PKGV ?= "${PV}"
+PKGR ?= "${PR}${DISTRO_PR}"
+
+EXTENDPKGEVER = "${@['','${PKGE\x7d:'][bb.data.getVar('PKGE',d,1) > 0]}"
+EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
+
def legitimize_package_name(s):
"""
Make sure package names are legitimate strings
@@ -489,7 +495,7 @@ python populate_packages () {
for pkg in package_list:
rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
- remstr = "${PN} (= ${EXTENDPV})"
+ remstr = "${PN} (= ${EXTENDPKGV})"
if main_is_empty and remstr in rdepends:
rdepends.remove(remstr)
for l in dangling_links[pkg]:
@@ -551,6 +557,8 @@ python emit_pkgdata() {
write_if_exists(sf, pkg, 'PN')
write_if_exists(sf, pkg, 'PV')
write_if_exists(sf, pkg, 'PR')
+ write_if_exists(sf, pkg, 'PKGV')
+ write_if_exists(sf, pkg, 'PKGR')
write_if_exists(sf, pkg, 'DESCRIPTION')
write_if_exists(sf, pkg, 'RDEPENDS')
write_if_exists(sf, pkg, 'RPROVIDES')
@@ -611,9 +619,9 @@ python package_do_shlibs() {
workdir = bb.data.getVar('WORKDIR', d, True)
- ver = bb.data.getVar('PV', d, True)
+ ver = bb.data.getVar('PKGV', d, True)
if not ver:
- bb.error("PV not defined")
+ bb.error("PKGV not defined")
return
pkgdest = bb.data.getVar('PKGDEST', d, True)
@@ -641,7 +649,9 @@ python package_do_shlibs() {
needs_ldconfig = False
bb.debug(2, "calculating shlib provides for %s" % pkg)
- pkgver = bb.data.getVar('PV_' + pkg, d, True)
+ pkgver = bb.data.getVar('PKGV_' + pkg, d, True)
+ if not pkgver:
+ pkgver = bb.data.getVar('PV_' + pkg, d, True)
if not pkgver:
pkgver = ver
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index 3582195393..420c892f10 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -208,9 +208,9 @@ python do_package_ipk () {
fields = []
pe = bb.data.getVar('PE', d, 1)
if pe and int(pe) > 0:
- fields.append(["Version: %s:%s-%s%s\n", ['PE', 'PV', 'PR', 'DISTRO_PR']])
+ fields.append(["Version: %s:%s-%s\n", ['PE', 'PKGV', 'PKGR']])
else:
- fields.append(["Version: %s-%s%s\n", ['PV', 'PR', 'DISTRO_PR']])
+ fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']])
fields.append(["Description: %s\n", ['DESCRIPTION']])
fields.append(["Section: %s\n", ['SECTION']])
fields.append(["Priority: %s\n", ['PRIORITY']])