summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2008-10-22 22:33:26 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2008-10-22 22:38:30 +0200
commit53bfb2398c16d2065ffa2bc6cd34c83e15347014 (patch)
tree3793fb7c6cb4799ec2c029b433636cb60fe7625b /classes
parent576cfbfba8880ea4421369d35236c696188b144d (diff)
parent245f7d129f3dba351b3c8ef284df69a86261904c (diff)
Merge branch 'shared/file-pr-revert' into org.openembedded.dev
Conflicts: packages/busybox/busybox_1.11.3.bb packages/dsplink/codec-engine_2.10.bb packages/gdb/gdb_6.3.bb packages/gdb/gdb_6.4.bb packages/gdb/gdb_6.6.bb packages/gdb/gdb_6.8.bb packages/glibc/glibc_2.2.5.bb packages/glibc/glibc_2.3.2+cvs20040726.bb packages/glibc/glibc_2.3.2.bb packages/glibc/glibc_2.3.3+cvs20041128.bb packages/glibc/glibc_2.3.3+cvs20050221.bb packages/glibc/glibc_2.3.3+cvs20050420.bb packages/glibc/glibc_2.3.3.bb packages/glibc/glibc_2.3.5+cvs20050627.bb packages/glibc/glibc_2.3.6.bb packages/glibc/glibc_2.4.bb packages/glibc/glibc_2.5.bb packages/glibc/glibc_2.6.1.bb packages/glibc/glibc_2.7.bb packages/kexecboot/linux-kexecboot_2.6.26.bb packages/libsdl/libsdl-x11_1.2.11.bb packages/linux/linux-rp_2.6.26.bb packages/mozilla/fennec_hg.bb packages/python/python_2.5.2.bb packages/tasks/task-xfce-base.bb packages/xorg-driver/xf86-video-omapfb_git.bb packages/xorg-xserver/xserver-kdrive_1.4.0.90.bb
Diffstat (limited to 'classes')
-rw-r--r--classes/package.bbclass6
-rw-r--r--classes/package_deb.bbclass6
-rw-r--r--classes/package_ipk.bbclass6
-rw-r--r--classes/package_rpm.bbclass8
-rw-r--r--classes/package_tar.bbclass4
5 files changed, 18 insertions, 12 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 0601885046..15574f6ced 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -4,6 +4,12 @@
PKGDEST = "${WORKDIR}/install"
+def build_package_revision(d):
+ 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 e59d194aeb..64d8d4ed5d 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), bb.data.getVar('PR', localdata, 1)))
+ note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), build_package_revision(localdata)))
bb.utils.unlockfile(lf)
continue
@@ -149,9 +149,9 @@ python do_package_deb () {
fields = []
pe = bb.data.getVar('PE', d, 1)
if pe and int(pe) > 0:
- fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']])
+ fields.append(["Version: %s:%s-%s%s\n", ['PE', 'PV', 'PR', 'DISTRO_PR']])
else:
- fields.append(["Version: %s-%s\n", ['PV', 'PR']])
+ fields.append(["Version: %s-%s%s\n", ['PV', 'PR', 'DISTRO_PR']])
fields.append(["Description: %s\n", ['DESCRIPTION']])
fields.append(["Section: %s\n", ['SECTION']])
fields.append(["Priority: %s\n", ['PRIORITY']])
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index f05b7449cf..438d4a15da 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), bb.data.getVar('PR', localdata, 1)))
+ note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), build_package_revision(localdata)))
bb.utils.unlockfile(lf)
continue
@@ -193,9 +193,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\n", ['PE', 'PV', 'PR']])
+ fields.append(["Version: %s:%s-%s%s\n", ['PE', 'PV', 'PR', 'DISTRO_PR']])
else:
- fields.append(["Version: %s-%s\n", ['PV', 'PR']])
+ fields.append(["Version: %s-%s%s\n", ['PV', 'PR', 'DISTRO_PR']])
fields.append(["Description: %s\n", ['DESCRIPTION']])
fields.append(["Section: %s\n", ['SECTION']])
fields.append(["Priority: %s\n", ['PRIORITY']])
diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass
index 6713f8fcad..e10ad90ffc 100644
--- a/classes/package_rpm.bbclass
+++ b/classes/package_rpm.bbclass
@@ -10,7 +10,6 @@ python write_specfile() {
out_vartranslate = {
"PKG": "Name",
"PV": "Version",
- "PR": "Release",
"DESCRIPTION": "%description",
"ROOT": "BuildRoot",
"LICENSE": "License",
@@ -41,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), bb.data.getVar('PR', d, 1)))
+ 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)))
return
# output .spec using this metadata store
@@ -58,6 +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("Summary\t: .\n")
for var in out_vartranslate.keys():
@@ -79,8 +79,8 @@ python write_specfile() {
bb.build.exec_func('BUILDSPEC', d)
# move the rpm into the pkgoutdir
- rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${PV}-${PR}.${TARGET_ARCH}.rpm', d)
- outrpm = bb.data.expand('${DEPLOY_DIR_RPM}/${PKG}-${PV}-${PR}.${TARGET_ARCH}.rpm', d)
+ rpm = bb.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${PV}-${PR}${DISTRO_PR}.${TARGET_ARCH}.rpm', d)
+ outrpm = bb.data.expand('${DEPLOY_DIR_RPM}/${PKG}-${PV}-${PR}${DISTRO_PR}.${TARGET_ARCH}.rpm', d)
bb.movefile(rpm, outrpm)
}
diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass
index 876cec6cfe..9ce0c98b8b 100644
--- a/classes/package_tar.bbclass
+++ b/classes/package_tar.bbclass
@@ -5,7 +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), bb.data.getVar('PR', d)))
+ 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)
bb.data.setVar('PKGFN', fn, d)
}
@@ -86,7 +86,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), bb.data.getVar('PR', localdata, 1)))
+ bb.note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), build_package_revision(localdata)))
continue
ret = os.system("tar -czf %s %s" % (tarfn, '.'))
if ret != 0: