From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80919C433F5 for ; Fri, 3 Dec 2021 20:30:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC095815D1; Fri, 3 Dec 2021 21:30:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 7482781C08; Fri, 3 Dec 2021 21:30:18 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0E708802DF for ; Fri, 3 Dec 2021 21:30:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=andy.shevchenko@gmail.com X-IronPort-AV: E=McAfee;i="6200,9189,10187"; a="236865494" X-IronPort-AV: E=Sophos;i="5.87,284,1631602800"; d="scan'208";a="236865494" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2021 12:30:13 -0800 X-IronPort-AV: E=Sophos;i="5.87,284,1631602800"; d="scan'208";a="460156481" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2021 12:30:12 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mtFB8-001tzF-0r; Fri, 03 Dec 2021 22:29:10 +0200 Date: Fri, 3 Dec 2021 22:29:09 +0200 From: Andy Shevchenko To: Simon Glass Cc: "u-boot@lists.denx.de" , Tom Rini Subject: Re: [PATCH v2 1/2] binman: Do not pollute source tree when build with `make O=...` Message-ID: References: <20211130190414.69157-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Fri, Dec 03, 2021 at 01:13:12PM -0700, Simon Glass wrote: > On Fri, 3 Dec 2021 at 00:55, Andy Shevchenko wrote: > > On Friday, December 3, 2021, Simon Glass wrote: > >> On Tue, 30 Nov 2021 at 12:04, Andy Shevchenko > >> wrote: ... > >> This look useful, but we cannot rely on 'srcdir' being in the > >> environment. > > > > True and code is aware of that. Nothing needs to be fixed. > > What am I missing? > > $ binman test > Traceback (most recent call last): > File "/home/sglass/bin/binman", line 23, in > srctree = os.environ['srctree'] > File "/usr/lib/python3.8/os.py", line 675, in __getitem__ > raise KeyError(key) from None > KeyError: 'srctree' I see, you mean that you run it when it's not in build tree? > >> For example, most binman development is done just by > >> running 'binman test' in the source tre. So perhaps default to the > >> current directory is 'srcdir' is not set? Ah, you mean you run it manually and not via `make`. os.environ.get('srctree', '') should help I suppose. P.S. What is the 'srcdir' you are referring to all the time? -- With Best Regards, Andy Shevchenko