diff options
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 5 |
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: |