From patchwork Mon Mar 14 02:13:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mittal, Anuj" X-Patchwork-Id: 5172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 561EFC433FE for ; Mon, 14 Mar 2022 02:14:06 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.21884.1647224044035250454 for ; Sun, 13 Mar 2022 19:14:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=P6Q2IENf; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: anuj.mittal@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647224045; x=1678760045; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=MrIrzVqYt7XfYHBi7gKTAKO9IF3ipbxPUhBt3hOoDW0=; b=P6Q2IENfCrOBzGTbo6aoybt1owLuB7SlwWup9k+OUeRABcG8N0igrV+j Xl8wM7UngK6jS2jE/R52w/21D2A4PNbMZvdElpIOEMxbbDwudOSWLYwnJ vXGjN9pA7Oqm58+lXtisKOv3At0MxQue3yVlXrbI8Mfsb8qPw1pTl8EQe FUNkA0vBCdDopozKELrEsQl4XVqJf41TLJ4YkgkxcQ74M8NzXIU5F5KBa l95+5SQLdiAF5LHYxmvmFxS3T36q0al9mQYN87PUyCnJvbCdoNVon5VtU 3TfROS5qAdWNHARWPQT0vhUirPC07/d6JVCKkexPmBWoyQY1TqSfKPVrN g==; X-IronPort-AV: E=McAfee;i="6200,9189,10285"; a="342344738" X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="342344738" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:05 -0700 X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="818562537" Received: from lsim7-mobl1.gar.corp.intel.com (HELO anmitta2-mobl3.intel.com) ([10.215.229.232]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:03 -0700 From: Anuj Mittal To: bitbake-devel@lists.openembedded.org Subject: [1.52][PATCH 1/5] contrib: Fix hash server Dockerfile dependencies Date: Mon, 14 Mar 2022 10:13:53 +0800 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 14 Mar 2022 02:14:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13477 From: Daniel Gomez When building the Hash Equivalence server Dockerfile, some dependencies are missing in order to run the hash server properly: Traceback errors: Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc ModuleNotFoundError: No module named 'bb' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in from . import git File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in import bb.progress File "/opt/bbhashserv/lib/bb/progress.py", line 14, in import bb.build File "/opt/bbhashserv/lib/bb/build.py", line 27, in from bb import data, event, utils File "/opt/bbhashserv/lib/bb/data.py", line 36, in from bb import data_smart File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in import bb, bb.codeparser File "/opt/bbhashserv/lib/bb/codeparser.py", line 26, in import codegen ModuleNotFoundError: No module named 'codegen' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1930, in from . import git File "/opt/bbhashserv/lib/bb/fetch2/git.py", line 70, in import bb.progress File "/opt/bbhashserv/lib/bb/progress.py", line 14, in import bb.build File "/opt/bbhashserv/lib/bb/build.py", line 27, in from bb import data, event, utils File "/opt/bbhashserv/lib/bb/data.py", line 36, in from bb import data_smart File "/opt/bbhashserv/lib/bb/data_smart.py", line 23, in import bb, bb.codeparser File "/opt/bbhashserv/lib/bb/codeparser.py", line 32, in from bb.pysh import pyshyacc, pyshlex File "/opt/bbhashserv/lib/bb/pysh/pyshyacc.py", line 13, in import bb.pysh.pyshlex as pyshlex File "/opt/bbhashserv/lib/bb/pysh/pyshlex.py", line 17, in from ply import lex ModuleNotFoundError: No module named 'ply' Traceback (most recent call last): File "/opt/bbhashserv/bin/bitbake-hashserv", line 61, in ret = main() File "/opt/bbhashserv/bin/bitbake-hashserv", line 54, in main server = hashserv.create_server(args.bind, args.database, upstream=args.upstream, read_only=args.read_only) File "/opt/bbhashserv/lib/hashserv/__init__.py", line 120, in create_server from . import server File "/opt/bbhashserv/lib/hashserv/server.py", line 14, in import bb.asyncrpc File "/opt/bbhashserv/lib/bb/__init__.py", line 128, in from bb import fetch2 as fetch File "/opt/bbhashserv/lib/bb/fetch2/__init__.py", line 1935, in from . import wget File "/opt/bbhashserv/lib/bb/fetch2/wget.py", line 30, in from bs4 import BeautifulSoup ModuleNotFoundError: No module named 'bs4' Signed-off-by: Daniel Gomez Signed-off-by: Richard Purdie (cherry picked from commit 0bd637acfcba5a44230c291889d2a5ff571cb8c6) Signed-off-by: Anuj Mittal --- contrib/hashserv/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/hashserv/Dockerfile b/contrib/hashserv/Dockerfile index d6fc728f..74b4a3be 100644 --- a/contrib/hashserv/Dockerfile +++ b/contrib/hashserv/Dockerfile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT # # Copyright (c) 2021 Joshua Watt -# +# # Dockerfile to build a bitbake hash equivalence server container # # From the root of the bitbake repository, run: @@ -15,5 +15,9 @@ RUN apk add --no-cache python3 COPY bin/bitbake-hashserv /opt/bbhashserv/bin/ COPY lib/hashserv /opt/bbhashserv/lib/hashserv/ +COPY lib/bb /opt/bbhashserv/lib/bb/ +COPY lib/codegen.py /opt/bbhashserv/lib/codegen.py +COPY lib/ply /opt/bbhashserv/lib/ply/ +COPY lib/bs4 /opt/bbhashserv/lib/bs4/ ENTRYPOINT ["/opt/bbhashserv/bin/bitbake-hashserv"] From patchwork Mon Mar 14 02:13:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mittal, Anuj" X-Patchwork-Id: 5173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51615C433EF for ; Mon, 14 Mar 2022 02:14:07 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.21884.1647224044035250454 for ; Sun, 13 Mar 2022 19:14:06 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=GfRbIc1B; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: anuj.mittal@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647224046; x=1678760046; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=k5DqUzTF/zzUx+a+tqIskFxonu16L0MDgRkz7JmFzJU=; b=GfRbIc1BHGFkkGlOwnvFKWES4L7P9CtCeutWzHVIayxO/EGgbxqd6DbM cuyMwUzTD5dFJifXSfLoxpu7QCykuQuN6vHN8aLtwf8ucT8b0aKtTkzm0 UgagwBqdz1w93yCiicq/QWYw2LMrr5uuzU1VGT4Qoq7Dp7UueHa67Hw0z qfisbogxThQSsSA+kwSuExQJLtQPS77a9klQ0biyCxg599Wbebgx/bN3l kzyiLimvQjHm2izLgIorCCpO7BotXK9pX9oTZIFmp5Y/BTF5tspEjmWyy 3gpyoLoIW8XXp+QZoAk25V5+OoeNlmgKBR9NvHoglVgHGkv6KAOAPwd9V g==; X-IronPort-AV: E=McAfee;i="6200,9189,10285"; a="342344741" X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="342344741" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:06 -0700 X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="818562578" Received: from lsim7-mobl1.gar.corp.intel.com (HELO anmitta2-mobl3.intel.com) ([10.215.229.232]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:05 -0700 From: Anuj Mittal To: bitbake-devel@lists.openembedded.org Subject: [1.52][PATCH 2/5] data_smart: Fix overrides file/line message additions Date: Mon, 14 Mar 2022 10:13:54 +0800 Message-Id: <2d7c63fd2626e55a17076befae33cfdca3ceedcc.1647223687.git.anuj.mittal@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 14 Mar 2022 02:14:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13478 From: Richard Purdie The overrides warning message is meant to show filename and line numbers but the variable names are incorrect and this wasn't working. Fix it. Signed-off-by: Richard Purdie (cherry picked from commit 551c1cb20fc9b9d0dab5d830182c2bf626e72845) Signed-off-by: Anuj Mittal --- lib/bb/data_smart.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 5ffedebc..e9603278 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -494,10 +494,10 @@ class DataSmart(MutableMapping): if not var.startswith("__anon_") and ("_append" in var or "_prepend" in var or "_remove" in var): info = "%s" % var - if "filename" in loginfo: - info += " file: %s" % loginfo[filename] - if "lineno" in loginfo: - info += " line: %s" % loginfo[lineno] + if "file" in loginfo: + info += " file: %s" % loginfo["file"] + if "line" in loginfo: + info += " line: %s" % loginfo["line"] bb.fatal("Variable %s contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." % info) self.expand_cache = {} From patchwork Mon Mar 14 02:13:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mittal, Anuj" X-Patchwork-Id: 5174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58549C433FE for ; Mon, 14 Mar 2022 02:14:08 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.21884.1647224044035250454 for ; Sun, 13 Mar 2022 19:14:08 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=maX8Wnjl; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: anuj.mittal@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647224048; x=1678760048; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=y28O2xmVVM67J3GtU1qB/vUObvwbmwDcHMQaNEaflEI=; b=maX8WnjlFrVX0Kmbc7o9ZYgq+RfFiCIR45OY9HyB5Tf1Jy4cx+MESQae 6E+BixxHul9Gh34tKLvC1NYux0Tdi/r+C9iGoeO+1HN5ZqR6Jj6BAZl21 RV+uN+TASk0QXCrwJvhrqj1pz2L59pR1QZGRPhavhMv+Rk0iVvgGg04PG e6A6drbnPKiR/MCwJIybBHy9jZfUdZg+t1wHKf4pgohIeKpVd0P0tEc7S 7W5MF8gLMfrfuwOvG1OJ1vpcPpmWETKY0msabcJrCAlCt40UOSIZUneaK ZYYw+EIaL0UFCvlMSEX4ECu5RgeMSKhSqrLwxb4HRMQF0POQeiuNremtN A==; X-IronPort-AV: E=McAfee;i="6200,9189,10285"; a="342344746" X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="342344746" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:07 -0700 X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="818562599" Received: from lsim7-mobl1.gar.corp.intel.com (HELO anmitta2-mobl3.intel.com) ([10.215.229.232]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:06 -0700 From: Anuj Mittal To: bitbake-devel@lists.openembedded.org Subject: [1.52][PATCH 3/5] cooker: Improve parsing failure from handled exception usability Date: Mon, 14 Mar 2022 10:13:55 +0800 Message-Id: <61d3f81169adf2d590b42cb87ebfdfc1df04e764.1647223687.git.anuj.mittal@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 14 Mar 2022 02:14:08 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13479 From: Richard Purdie When a recipe raises a BBHandledException, it means the error was already shown to the user. Adding an additional one here isn't helpful. What is helpful is to mention that parsing was halted. Tweak the code to do this with improves the messages the user sees and helps understand what happened. Signed-off-by: Richard Purdie (cherry picked from commit fdf6ebc8b603fcfd3ed7c64baf486a4adabd25be) Signed-off-by: Anuj Mittal --- lib/bb/cooker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 3688aa08..288d73fd 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -2167,6 +2167,8 @@ class CookerParser(object): self.total) bb.event.fire(event, self.cfgdata) + else: + bb.error("Parsing halted due to errors") for process in self.processes: self.parser_quit.put(None) @@ -2257,7 +2259,7 @@ class CookerParser(object): return False except bb.BBHandledException as exc: self.error += 1 - logger.error('Failed to parse recipe: %s' % exc.recipe) + logger.debug('Failed to parse recipe: %s' % exc.recipe) self.shutdown(clean=False, force=True) return False except ParsingFailure as exc: From patchwork Mon Mar 14 02:13:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mittal, Anuj" X-Patchwork-Id: 5176 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5335CC433F5 for ; Mon, 14 Mar 2022 02:14:15 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.21884.1647224044035250454 for ; Sun, 13 Mar 2022 19:14:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=C72msWJ3; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: anuj.mittal@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647224049; x=1678760049; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=U6UuWrV2BMQv5zqZgsfjo3SBDMzmLczOzl4ZMeb1y8g=; b=C72msWJ3aWWU6/qn9QkCpnK96AwJu/hh+j+WKs5qyuF0bsstEJaONmpJ q4kn0OWn6D1DW7FxX8o9Ix3/lSdv+nwCmefduMqa+hkQl25HIk2H3Y6Qz dpPGBuzm9cq5WIq5mOvxANcaIbFmkoKwva6d9mvFYx5Z3wr0lGt3IIVtA A1zc8O5EjOoYbFSP+rJ76ngmfN1b8D+CfJOkOfEVuNetHVb4YlOIsK3s/ IQEANQohvtYM7XU2I1Kbmz1XzwIH/6o/9BPlqj3T1rPx0EgjRJTnkuN8K BeKLXPb60D+FLFRbKg98ya68ca2ZFzarylA50YuD3yZ46NE8WaaaOwhAf g==; X-IronPort-AV: E=McAfee;i="6200,9189,10285"; a="342344752" X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="342344752" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:08 -0700 X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="818562604" Received: from lsim7-mobl1.gar.corp.intel.com (HELO anmitta2-mobl3.intel.com) ([10.215.229.232]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:07 -0700 From: Anuj Mittal To: bitbake-devel@lists.openembedded.org Subject: [1.52][PATCH 4/5] utils: Ensure shell function failure in python logging is correct Date: Mon, 14 Mar 2022 10:13:56 +0800 Message-Id: <910ced8c16f982722ce9fe06c561a7a71eca9e58.1647223687.git.anuj.mittal@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 14 Mar 2022 02:14:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13480 From: Richard Purdie If a python function exec_func() calls a shell task, the logging wasn't working correctly in all cases since the exception was turned into a BBHandledException() and the logfile piece was lost which is handled at the top task level. The easiest way to avoid this is to allow the ExecutionError exceptions to be raised to a higher level, we don't need the traceback for them. Signed-off-by: Richard Purdie (cherry picked from commit 7cae11f558f9ff5fd05ef23b789aaef92fb5a327) Signed-off-by: Anuj Mittal --- lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 1a515897..cd442dcd 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -401,7 +401,7 @@ def better_exec(code, context, text = None, realfile = "", pythonexception code = better_compile(code, realfile, realfile) try: exec(code, get_context(), context) - except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError): + except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError, bb.process.ExecutionError): # Error already shown so passthrough, no need for traceback raise except Exception as e: From patchwork Mon Mar 14 02:13:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mittal, Anuj" X-Patchwork-Id: 5175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51C30C433F5 for ; Mon, 14 Mar 2022 02:14:11 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.21884.1647224044035250454 for ; Sun, 13 Mar 2022 19:14:10 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ggOPkZ9w; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: anuj.mittal@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647224050; x=1678760050; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=1+w0rtyuSFvcBDpO+L4ONoTRjn6i4FeZk/KYqEuNfGc=; b=ggOPkZ9wVHfjC6KWDwaiEZJKQp3wT0y56lyAFzcZB3jQHqjdd92LQmeG +oPJlvmGv8rjPai6QPlDprnY2qVYBFZD44YK6LMRUnF3/PC32CcktwLwX KJWWhI8UK+r/LSieJA1kdH3nQFvSdTVwACEY5DN+5F4f8M668QvDD7QcZ Kj3NJrm79nTEQmnPv0+87WnAgvr/f7YvSZ7dN42u6xFdBJd/KRjCN6EXG s9+mVrXpkCB6iAMorZ3k0NBU0LzUE0fdqolQo5CAdF3cf84IeiNDKBxzw 6PW8g6KfnwEc62mHaJ7CrdEruytXw0BNKpWSUDpmj8DA0RtcxncANRzl9 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10285"; a="342344763" X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="342344763" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:10 -0700 X-IronPort-AV: E=Sophos;i="5.90,179,1643702400"; d="scan'208";a="818562607" Received: from lsim7-mobl1.gar.corp.intel.com (HELO anmitta2-mobl3.intel.com) ([10.215.229.232]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Mar 2022 19:14:09 -0700 From: Anuj Mittal To: bitbake-devel@lists.openembedded.org Subject: [1.52][PATCH 5/5] fetch2: ssh: username and password are optional Date: Mon, 14 Mar 2022 10:13:57 +0800 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 14 Mar 2022 02:14:11 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13481 From: Daniel Wagenknecht Support URLs like ssh://HOST/PATH. They were previously not recognized due to a missing @ sign. Signed-off-by: Daniel Wagenknecht Signed-off-by: Richard Purdie (cherry picked from commit a2aa18bd27dac8902e52b466cb7118f71367d3dc) Signed-off-by: Anuj Mittal --- lib/bb/fetch2/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py index 2c8557e1..a104c9eb 100644 --- a/lib/bb/fetch2/ssh.py +++ b/lib/bb/fetch2/ssh.py @@ -40,9 +40,9 @@ __pattern__ = re.compile(r''' ( # Optional username/password block (?P\S+) # username (:(?P\S+))? # colon followed by the password (optional) - )? (?P(;[^;]+)*)? # connection parameters block (optional) @ + )? (?P\S+?) # non-greedy match of the host (:(?P[0-9]+))? # colon followed by the port (optional) /