summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2021-08-19 12:51:55 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-23 08:30:55 +0100
commit3874ce6ee53e6dbb6f84ac3becb7c182e47def7a (patch)
tree0fa3df79ce9befb3d2091c6216a9cb139494a968 /meta/classes/package.bbclass
parent9d88d1d095a60ba592fee6ec977dd40cdc74abc8 (diff)
downloadpoky-3874ce6ee53e6dbb6f84ac3becb7c182e47def7a.tar.gz
prservice: remove connection caching
This patch is a follow on of the the PR server rework in bitbake to add read-only support. The shift to using the bb.asyncrpc code in the PR server and client brings issues with respect to reuse of the same asyncio loop in different processes. This patch removes the PR service connection caching to avoid one source of this problem. It is believed that in practice this should have little impact on overall performance. (From OE-Core rev: 0fc3055027e2a76ac863f1c0e0d52e95748066aa) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass5
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e17f0c797e..c4c5515d5d 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -714,9 +714,7 @@ python package_get_auto_pr() {
714 return 714 return
715 715
716 try: 716 try:
717 conn = d.getVar("__PRSERV_CONN") 717 conn = oe.prservice.prserv_make_conn(d)
718 if conn is None:
719 conn = oe.prservice.prserv_make_conn(d)
720 if conn is not None: 718 if conn is not None:
721 if "AUTOINC" in pkgv: 719 if "AUTOINC" in pkgv:
722 srcpv = bb.fetch2.get_srcrev(d) 720 srcpv = bb.fetch2.get_srcrev(d)
@@ -725,6 +723,7 @@ python package_get_auto_pr() {
725 d.setVar("PRSERV_PV_AUTOINC", str(value)) 723 d.setVar("PRSERV_PV_AUTOINC", str(value))
726 724
727 auto_pr = conn.getPR(version, pkgarch, checksum) 725 auto_pr = conn.getPR(version, pkgarch, checksum)
726 conn.close()
728 except Exception as e: 727 except Exception as e:
729 bb.fatal("Can NOT get PRAUTO, exception %s" % str(e)) 728 bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
730 if auto_pr is None: 729 if auto_pr is None: