From patchwork Thu Mar 1 18:26:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 130385 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3132676edc; Thu, 1 Mar 2018 10:27:21 -0800 (PST) X-Google-Smtp-Source: AG47ELsSEEYBJ6BKbU/kSJcVNLbMmN7RlKx/mpiqAmXHN33cW/qMQqXihDmy5l23BTOzbAH33HEf X-Received: by 10.101.72.199 with SMTP id o7mr2255170pgs.303.1519928841408; Thu, 01 Mar 2018 10:27:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519928841; cv=none; d=google.com; s=arc-20160816; b=eqtUCYk9RDzFX9PmOvdjATlR1VJcrx5SjC2SzWb5Ia1BS7yfpT0TXh34H5F8XNoPsD Za+GaXChYmx2n1WNWNNjSLYNpdL7nhY617GdGgBO1Y31nu/WvJTHffOTklb72PgStMxY 2+ej0IhRFCG+Lmb1U29ExbBZcLhbKFvRKhQS6zC1WV4RMrWBOMUCc4KT2+ZmDM5bvx0s PJqsP9Nm2ZSmkgW/t3OyJtKEzWTUorVYhEBQ/rERu6FFDPAMrdOoziS41sU+SXgHid08 vGVqR3BGZdRE8n/TXLMMCPzfbhqaGyJPmP/AGKK9F7L1R0hTBhYJKtel+TKb8AjGuKAZ d/3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=qjX25RPT/sgXmYI+O8e7kQY32ei5lQ98Ibc7pq0rT00=; b=YY7j7T7ecBi3AdV7VJOi0gXVBejsGA2U4KUvzmkrGnsHZPwVygmQDdBLBb74fwKEPD L07AFbqLV5Iv+H4TyfccjVBlYArpzIi1ym7xqWehIZK9VAW4LjU5FGslJeSt+T59VxaF aFR8HzwN6XxHnBDtauRfB6vHKazHIXJB28Q/UvOGnxS2KqB59vnAwUWTNDD1L5OZGxbP wd8zZzob7iKt5nwmEoe0tCc7AxKhC/WokVEkR2uvQyum/FboU/NUQ0iGbkU4aQTOmoUd zaPbn4HmKsMYyh4bRIGIZu3DZEnE4hI31VjfxF5G1sMNKr5WCP/xjDBLJh8nEkGltivR TclA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=tSAMuQ0g; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b5si3363404pfc.337.2018.03.01.10.27.21; Thu, 01 Mar 2018 10:27:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=tSAMuQ0g; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id D58E9788F2; Thu, 1 Mar 2018 18:26:56 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by mail.openembedded.org (Postfix) with ESMTP id ACCA278882 for ; Thu, 1 Mar 2018 18:26:46 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id w77so7592754wrc.6 for ; Thu, 01 Mar 2018 10:26:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=JiI0yLyGnULS2BwF0V0yVVwzDZYOoTs0o6Z2fWwTYtM=; b=tSAMuQ0goc8NbjQJjsPOqZkl0CijBMiYaC0223+vofbeizrxrsptBzrxkHzfggDzB0 E7m1MTC+l7n79DGO5B1o9ck1zbo1ilL4GReWFXi/vYIDrezDLk1dNY+0SGKxN5jaCiQG 55e2Zvo/Do+UDTt1q0oHURe1BbUcAwd9dReJHe6TbPGNfifaziYr6xMO7Y+TNkeKKv8b SRbjURcVj2DaWXC+P9ikJ5q4Imscmw7sYFnXvASRaX6KGchuJzmCrsLBj9Il8KcOr6at yOd/r6a5dW37q27zvfcs6NmrG1OTkPsZjW4BQk+esr+3LgRyfaE6/GmvBxEyp84rpg8p LWTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=JiI0yLyGnULS2BwF0V0yVVwzDZYOoTs0o6Z2fWwTYtM=; b=lgzHAIhHYqZBQ51IkSvXXTQrQs/eEb/xipY0rEzayKrD8hbQmQARSt//Np9CThMjzt z1AMzvUmg08C2e3FpmCBhLx3ZipyU/ORBX+I9cFt/rqquosQMr6BrGWz8B7WU53KENRx YbOJZhPpbxwM0f7TTwBCa+rD9IgBpUx9QG3mUIyp4rbv6djBqw4SFN7TgTyiVZXrx6AI 2aoaHuWR/3nUxExMHUoplVppi7vhbGCkg5W8fCjomkmEBajIg41D4WDx0QLozBGTxdMx vX3yJQrLeKqu6Yyhmk/1n0Vc8luWUUFqWRs46FFaGI5+43HwloXrf2z3J/j/6hQYZuGH C7lg== X-Gm-Message-State: APf1xPCU0dRGjnPJ5B+xzc/njvIWvlf2f4pA/4GDErnlVhoJ/d78aCNJ dSFBn1RO9e0UZvDPaEqxFrG8uQox X-Received: by 10.223.163.93 with SMTP id d29mr2808339wrb.187.1519928807080; Thu, 01 Mar 2018 10:26:47 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id h188sm4955285wmf.23.2018.03.01.10.26.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 10:26:46 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 1 Mar 2018 18:26:29 +0000 Message-Id: <20180301182634.20502-6-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180301182634.20502-1-ross.burton@intel.com> References: <20180301182634.20502-1-ross.burton@intel.com> Subject: [OE-core] [PATCH 06/11] package_manager: improve install_complementary X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org - No need to use bb.utils.which() as subprocess will search $PATH - Clarity flow by moving the install inside the try/except Signed-off-by: Ross Burton --- meta/lib/oe/package_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index f7e013437c9..e37dd4e8a2f 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -402,7 +402,7 @@ class PackageManager(object, metaclass=ABCMeta): installed_pkgs.write(output) installed_pkgs.flush() - cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"), + cmd = ["oe-pkgdata-util", "-p", self.d.getVar('PKGDATA_DIR'), "glob", installed_pkgs.name, globs] exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY') @@ -412,11 +412,11 @@ class PackageManager(object, metaclass=ABCMeta): bb.note("Installing complementary packages ...") bb.note('Running %s' % cmd) complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8") + self.install(complementary_pkgs.split(), attempt_only=True) except subprocess.CalledProcessError as e: bb.fatal("Could not compute complementary packages list. Command " "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) - self.install(complementary_pkgs.split(), attempt_only=True) def deploy_dir_lock(self): if self.deploy_dir is None: