mirror of
https://git.yoctoproject.org/poky
synced 2026-07-21 05:27:01 +00:00
classes/package(prserv).bbclass: Get PRAUTO and use PKGV/PKGR.
1. Added package_get_auto_pr to PACKAGEFUNCS to get the auto incremented value(PRAUTO) from remote PR service. 2. use PKGV/PKGR for pkgdata which will be used by package_write_xxx. 3. Added supporting functions in prserv.bbclass. (From OE-Core rev: b1f6120c04731d3d66f322ce550b0d223c118dab) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f906608f68
commit
66d27435be
@@ -0,0 +1,29 @@
|
||||
def prserv_make_conn(d):
|
||||
import prserv.serv
|
||||
host=d.getVar("PRSERV_HOST",True)
|
||||
port=d.getVar("PRSERV_PORT",True)
|
||||
try:
|
||||
conn=None
|
||||
conn=prserv.serv.PRServerConnection(host,int(port))
|
||||
d.setVar("__PRSERV_CONN",conn)
|
||||
except Exception, exc:
|
||||
bb.fatal("Connecting to PR service %s:%s failed: %s" % (host, port, str(exc)))
|
||||
|
||||
return conn
|
||||
|
||||
def prserv_get_pr_auto(d):
|
||||
if not d.getVar('USE_PR_SERV', True):
|
||||
bb.warn("Not using network based PR service")
|
||||
return None
|
||||
|
||||
conn=d.getVar("__PRSERV_CONN", True)
|
||||
if conn is None:
|
||||
conn=prserv_make_conn(d)
|
||||
if conn is None:
|
||||
return None
|
||||
|
||||
version=d.getVar("PF", True)
|
||||
checksum=d.getVar("BB_TASKHASH", True)
|
||||
auto_rev=conn.getPR(version,checksum)
|
||||
bb.debug(1,"prserv_get_pr_auto: version: %s checksum: %s result %d" % (version, checksum, auto_rev))
|
||||
return auto_rev
|
||||
Reference in New Issue
Block a user