summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package.bbclass8
-rw-r--r--meta/classes/prserv.bbclass2
-rw-r--r--meta/conf/bitbake.conf7
-rw-r--r--meta/lib/oe/prservice.py18
4 files changed, 13 insertions, 22 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 8e07168be3..60d3df7789 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -396,15 +396,13 @@ def runtime_mapping_rename (varname, d):
396# 396#
397 397
398python package_get_auto_pr() { 398python package_get_auto_pr() {
399 # per recipe PRSERV_HOST PRSERV_PORT 399 # per recipe PRSERV_HOST
400 pn = d.getVar('PN', True) 400 pn = d.getVar('PN', True)
401 host = d.getVar("PRSERV_HOST_" + pn, True) 401 host = d.getVar("PRSERV_HOST_" + pn, True)
402 port = d.getVar("PRSERV_PORT_" + pn, True)
403 if not (host is None): 402 if not (host is None):
404 d.setVar("PRSERV_HOST", host) 403 d.setVar("PRSERV_HOST", host)
405 if not (port is None): 404
406 d.setVar("PRSERV_PORT", port) 405 if d.getVar('PRSERV_HOST', True):
407 if d.getVar('USE_PR_SERV', True) != "0":
408 try: 406 try:
409 auto_pr=prserv_get_pr_auto(d) 407 auto_pr=prserv_get_pr_auto(d)
410 except Exception as e: 408 except Exception as e:
diff --git a/meta/classes/prserv.bbclass b/meta/classes/prserv.bbclass
index 33547f989c..b440d863ef 100644
--- a/meta/classes/prserv.bbclass
+++ b/meta/classes/prserv.bbclass
@@ -3,7 +3,7 @@ def prserv_get_pr_auto(d):
3 import re 3 import re
4 4
5 pv = d.getVar("PV", True) 5 pv = d.getVar("PV", True)
6 if d.getVar('USE_PR_SERV', True) != "1": 6 if not d.getVar('PRSERV_HOST', True):
7 if 'AUTOINC' in pv: 7 if 'AUTOINC' in pv:
8 d.setVar("PKGV", pv.replace("AUTOINC", "0")) 8 d.setVar("PKGV", pv.replace("AUTOINC", "0"))
9 bb.warn("Not using network based PR service") 9 bb.warn("Not using network based PR service")
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 13a3ff9a3d..b6ab5c3cb1 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -207,11 +207,6 @@ SPECIAL_PKGSUFFIX = "-native -cross -initial -intermediate -crosssdk -cross-cana
207BPN = "${@base_prune_suffix(d.getVar('PN', True), d.getVar('SPECIAL_PKGSUFFIX', True).split(), d)}" 207BPN = "${@base_prune_suffix(d.getVar('PN', True), d.getVar('SPECIAL_PKGSUFFIX', True).split(), d)}"
208BP = "${BPN}-${PV}" 208BP = "${BPN}-${PV}"
209 209
210#
211# network based PR service
212#
213USE_PR_SERV = "${@[1,0][((not d.getVar('PRSERV_HOST', True)) or (not d.getVar('PRSERV_PORT', True))) and (not d.getVar('PRSERV_LOCKDOWN', True))]}"
214
215# Package info. 210# Package info.
216 211
217SECTION = "base" 212SECTION = "base"
@@ -778,7 +773,7 @@ BB_SIGNATURE_HANDLER ?= "OEBasicHash"
778BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \ 773BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
779 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \ 774 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
780 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \ 775 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
781 PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \ 776 PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
782 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE" 777 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE"
783BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER \ 778BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER \
784 DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK \ 779 DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK \
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index c3fb76a338..57fb39a371 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -1,11 +1,10 @@
1 1
2def prserv_make_conn(d, check = False): 2def prserv_make_conn(d, check = False):
3 import prserv.serv 3 import prserv.serv
4 host = d.getVar("PRSERV_HOST",True) 4 host_params = filter(None, (d.getVar("PRSERV_HOST", True) or '').split(':'))
5 port = d.getVar("PRSERV_PORT",True)
6 try: 5 try:
7 conn = None 6 conn = None
8 conn = prserv.serv.PRServerConnection(host,int(port)) 7 conn = prserv.serv.PRServerConnection(host_params[0], int(host_params[1]))
9 if check: 8 if check:
10 if not conn.ping(): 9 if not conn.ping():
11 raise Exception('service not available') 10 raise Exception('service not available')
@@ -16,7 +15,7 @@ def prserv_make_conn(d, check = False):
16 return conn 15 return conn
17 16
18def prserv_dump_db(d): 17def prserv_dump_db(d):
19 if d.getVar('USE_PR_SERV', True) != "1": 18 if not d.getVar('PRSERV_HOST', True):
20 bb.error("Not using network based PR service") 19 bb.error("Not using network based PR service")
21 return None 20 return None
22 21
@@ -35,7 +34,7 @@ def prserv_dump_db(d):
35 return conn.export(opt_version, opt_pkgarch, opt_checksum, opt_col) 34 return conn.export(opt_version, opt_pkgarch, opt_checksum, opt_col)
36 35
37def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksum=None): 36def prserv_import_db(d, filter_version=None, filter_pkgarch=None, filter_checksum=None):
38 if d.getVar('USE_PR_SERV', True) != "1": 37 if not d.getVar('PRSERV_HOST', True):
39 bb.error("Not using network based PR service") 38 bb.error("Not using network based PR service")
40 return None 39 return None
41 40
@@ -115,14 +114,13 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
115 bb.utils.unlockfile(lf) 114 bb.utils.unlockfile(lf)
116 115
117def prserv_check_avail(d): 116def prserv_check_avail(d):
118 host = d.getVar("PRSERV_HOST",True) 117 host_params = filter(None, (d.getVar("PRSERV_HOST", True) or '').split(':'))
119 port = d.getVar("PRSERV_PORT",True)
120 try: 118 try:
121 if not host: 119 if len(host_params) != 2:
122 raise TypeError 120 raise TypeError
123 else: 121 else:
124 port = int(port) 122 int(host_params[1])
125 except TypeError: 123 except TypeError:
126 bb.fatal("Undefined or incorrect values of PRSERV_HOST or PRSERV_PORT") 124 bb.fatal('Undefined/incorrect PRSERV_HOST value. Format: "host:port"')
127 else: 125 else:
128 prserv_make_conn(d, True) 126 prserv_make_conn(d, True)