Patchwork [02/11] conf/bitbake.conf: Added variables for PR service.

login
register
mail settings
Submitter Lianhao Lu
Date May 27, 2011, 6:31 a.m.
Message ID <abf0f702d8f1cd1d9c02c9a6ae0fd6ffa198ce2b.1306477652.git.lianhao.lu@intel.com>
Download mbox | patch
Permalink /patch/4875/
State New, archived
Headers show

Comments

Lianhao Lu - May 27, 2011, 6:31 a.m.
1. change BB_SIGNATURE_HANDLER from basic to basichash.

2. Added following variables for PR service:
USE_PR_SERV: flag of whether to use the network PR service
PRAUTOINX: search index for the network PR service
PKGE/PKGV/PKGR: epoch, version and revision used in package feed.
EXTENDPKGV: full package version string used in package relationships.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/conf/bitbake.conf |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d307385..4fcf4f6 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -153,9 +153,18 @@  PR = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[2] or 'r0
 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
 EXTENDPE = "${@['','${PE\x7d_'][bb.data.getVar('PE',d,1) > 0]}"
 EXTENDPEVER = "${@['','${PE\x7d:'][bb.data.getVar('PE',d,1) > 0]}"
-EXTENDPV = "${EXTENDPEVER}${PV}-${PR}"
+EXTENDPV = "${EXTENDPEVER}${PV}-${PR}{DISTRO_PR}"
 P = "${PN}-${PV}"
 
+EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][bb.data.getVar('PRAUTO',d,1) is None]}"
+PRAUTOINX = "${PF}${DISTRO_PR}"
+
+PKGV ?= "${PV}"
+PKGR ?= "${PR}${DISTRO_PR}${EXTENDPRAUTO}"
+PKGE ?= "${@['','${PE\x7d'][bb.data.getVar('PE',d,1) > 0]}"
+EXTENDPKGEVER = "${@['','${PKGE\x7d:'][bb.data.getVar('PKGE',d,1).strip() != '']}"
+EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
+
 # Base package name
 # Automatically derives "foo" from "foo-native", "foo-cross" or "foo-initial"
 # otherwise it is the same as PN and P
@@ -163,6 +172,11 @@  SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -nativesdk -crosssdk
 BPN = "${@base_prune_suffix(bb.data.getVar('PN', d, True), bb.data.getVar('SPECIAL_PKGSUFFIX', d, True).split(), d)}"
 BP = "${BPN}-${PV}"
 
+#
+# network based PR service
+#
+USE_PR_SERV = "${@[1,0][(bb.data.getVar('PRSERV_HOST',d,1) is None) or (bb.data.getVar('PRSERV_PORT',d,1) is None)]}"
+
 # Package info.
 
 SECTION = "base"
@@ -241,7 +255,7 @@  FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
                 ${base_libdir}/*.a ${base_libdir}/*.o"
 SECTION_${PN}-dev = "devel"
 ALLOW_EMPTY_${PN}-dev = "1"
-RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"
+RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"
 
 DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
             ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
@@ -253,7 +267,7 @@  FILES_${PN}-dbg = "${@bb.data.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][
 
 SECTION_${PN}-dbg = "devel"
 ALLOW_EMPTY_${PN}-dbg = "1"
-RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
+RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPKGV})"
 
 FILES_${PN}-locale = "${datadir}/locale"
 
@@ -650,6 +664,7 @@  PCMCIA_MANAGER ?= "pcmcia-cs"
 DEFAULT_TASK_PROVIDER ?= "task-base"
 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
 IMAGE_ROOTFS_SIZE ?= "65536"
+DISTRO_PR ?= ''
 
 # Forcefully set CACHE now so future changes to things like 
 # MACHINE don't change the path to the cache
@@ -708,7 +723,7 @@  DISTRO[unexport] = "1"
 TRANSLATED_TARGET_ARCH ??= ${TARGET_ARCH}
 
 # Setup our default hash policy
-BB_SIGNATURE_HANDLER ?= "basic"
+BB_SIGNATURE_HANDLER ?= "basichash"
 BB_HASHTASK_WHITELIST ?= "(.*-cross$|.*-native$|.*-cross-initial$|.*-cross-intermediate$|^virtual:native:.*|^virtual:nativesdk:.*)"
 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE"