From patchwork Fri Aug 31 12:11:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 145602 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp702335ljw; Fri, 31 Aug 2018 05:11:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYk/rTArBMOMGlRbqbXz2uRzQNVUnjfOvZMDS51prclMH3iql7gsC6TLHZ/HhdWqZOhRYDs X-Received: by 2002:a17:902:20ca:: with SMTP id v10-v6mr15357421plg.156.1535717507059; Fri, 31 Aug 2018 05:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535717507; cv=none; d=google.com; s=arc-20160816; b=G44iiEag+vWagxMSDoCk2qzgdaykDF9YLYbeR6t8XEYiCTkTetzAy0/NSRq9uRD51b ChwxH10tIUjgQ7RFDXB4nfj05iTDPjhUkNjQy78oTGJr79pUzJpDBcBC7t2z0YcS9CJR zgTDlOi7CL29jOHYxR6WUcEVa9TUHNDYNYPhx2HHrVfhB00GUGZcRB7PRiU2/Vx+tcAX G/5NlYLrvWJeousn+oAWylXl11pAJqzaFDRebEtaSsEWW/d1ajDRLNtSPEcuSKH/blUz OxZ3ac2znTq+S3ZaXJlH85Vu1Jz2PgFRdR+wmeZXKKccHDg8K1KhXDbEHcgvBjSbYHDj FuBA== 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:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=ecjQyIdh3CcxZ73Qu1Q7hJ2XLRV4kDiAxPzjFJmNJsA=; b=GVj2KxjDBXpwE1uEbvrERrWiLNmi9WQotI+5Pkk7seWUfHAWZbA3On1OqSCSyPscbE PadgklpPsIfWA5jmqvaVGtCIIaxmrBTbV2GlYPr4zHxs85NeaYQ37uJuS7q5bNfxD3WG UGgb9PJeA4xvC77EKS33ItRodsc2FoNK9K2v/e1JT4Mp/GQUaqyI2rEfmnM8E+LbQNI6 hpuOmYFyuuPqYjnWbPpR/iC3RLYSpdwzjcgixxz9EAKoLe+PNTvNp5qINPd7nxZYoliv IrbLHniWvtAWunFFByCnzo62FXVORAa2T9S+BaaP43wpU3esG3DYY8SLVatSQpcHg3bg LCgA== 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=Yw51DnbL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id v9-v6si10167880pfg.123.2018.08.31.05.11.46; Fri, 31 Aug 2018 05:11:47 -0700 (PDT) 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=Yw51DnbL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id E229579557; Fri, 31 Aug 2018 12:11:44 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mail.openembedded.org (Postfix) with ESMTP id B72EF790AB for ; Fri, 31 Aug 2018 12:11:43 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id o37-v6so11003644wrf.6 for ; Fri, 31 Aug 2018 05:11:45 -0700 (PDT) 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; bh=q4KyQ+4Hqt35O98aYufWBaaWAXX+H77Q1VzMeZ5Pm6c=; b=Yw51DnbLhnlH/cODjak6aLCRDRDc1jWLiUiZU/C6j3T2PzyJP54i3G+GpuC3wp5eng wZR19M6d50ALKaMpScoaBCm3GXPEy+VAkU2VxdMr7vbBZdgpdpQa28HK2OTEZKCH36ga GyDi5SsQFcj0WxFVp09KARTHn1i4ZtV94oNjz5AsQr36axa9M11kokhf1gbLrpB4SoMG yl1qwtmkOM3AZQwKHEgukyXJB8cWs+j4UWviQl86YLB5RfZQRN2h5Xk886gsy+1EQyHr MqP9sFLod2gAl6beWfUOvAEVAAT9hLdfc+D6DVsDmiAaxsYdEfLduXYUsxLhoQujjRp4 o9wQ== 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; bh=q4KyQ+4Hqt35O98aYufWBaaWAXX+H77Q1VzMeZ5Pm6c=; b=Za/FhB2cnmia3KJtAN4Eq/nNK4/s1Xr97QEjHA1Ck2QmEqjeBlOmMV/L70iXOoo8UT kV9ANXtUKIQHp6D1n8GvTfk3Du8+h6+X48ENeq9DDjtDrxRM5rJp+VG62UQhdavAWeGj fkfGk7mulH5ZV10LzQEqY5r03vXOqQPQwBrmYLaVWTqC5pCT/ORkDUbpy9gBLAyyhFAb ZpRkZ4y5YED3O/vTsQqtYHKoUEme8BLf97QlyUZ0SXqprj2rGQuO5DjlCfNKLOLg1Z1Q RKoBASJQOB2/HjM8Dqeb+7Y810gKpDUpDbdVtCC6j4pXiK8UfHwT5jHo0lp6weHOAgSY cC1Q== X-Gm-Message-State: APzg51CgYq0Tr4swL8Hagd6XHp/zgYOTjchsAHOHlM+yX0XH2PfVNFGM y4zwjWUUhj84gC/CDk6fJ8lxgh087Tk= X-Received: by 2002:adf:f1cc:: with SMTP id z12-v6mr399849wro.214.1535717504087; Fri, 31 Aug 2018 05:11:44 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id 184-v6sm8173150wmv.6.2018.08.31.05.11.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 05:11:43 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 31 Aug 2018 13:11:41 +0100 Message-Id: <20180831121141.30470-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] oe-pkgdata-util: add option for lookup-recipe to not fatally fail 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 It is often useful to run lookup-recipe on a list of packages and get notifications that there were failures, instead of a fatal error on the first failure. This makes it possible to pass long lists of packages to oe-pkgdata-util and process the output. Signed-off-by: Ross Burton --- scripts/oe-pkgdata-util | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index e6c9df94e83..53739b0bfc5 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util @@ -279,10 +279,14 @@ def lookup_recipe(args): parse_pkgdatafile(pkgdatafile) continue pkgdatafile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg) - if not os.path.exists(pkgdatafile): - logger.error("The following packages could not be found: %s" % pkg) - sys.exit(1) - parse_pkgdatafile(pkgdatafile) + if os.path.exists(pkgdatafile): + parse_pkgdatafile(pkgdatafile) + else: + if args.carryon: + print("The following packages could not be found: %s" % pkg) + else: + logger.error("The following packages could not be found: %s" % pkg) + sys.exit(1) def package_info(args): def parse_pkgdatafile(pkgdatafile): @@ -558,6 +562,7 @@ def main(): help='Find recipe producing one or more packages', description='Looks up the specified runtime package(s) to see which recipe they were produced by') parser_lookup_recipe.add_argument('pkg', nargs='+', help='Runtime package name to look up') + parser_lookup_recipe.add_argument('-c', '--continue', dest="carryon", help='Continue looking up recipes even if we can not find one', action='store_true') parser_lookup_recipe.set_defaults(func=lookup_recipe) parser_package_info = subparsers.add_parser('package-info',