From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 14 Feb 2023 15:21:53 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pRwBu-007PuR-UG for lore@lore.pengutronix.de; Tue, 14 Feb 2023 15:21:53 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pRwBr-00054E-Ow; Tue, 14 Feb 2023 15:21:51 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRwBe-00053b-It; Tue, 14 Feb 2023 15:21:38 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pRwBe-0003hz-Bq; Tue, 14 Feb 2023 15:21:38 +0100 Date: Tue, 14 Feb 2023 15:21:38 +0100 From: Michael Olbrich To: Sven =?iso-8859-1?Q?P=FCschel?= Message-ID: <20230214142138.GO21075@pengutronix.de> Mail-Followup-To: Sven =?iso-8859-1?Q?P=FCschel?= , ptxdist@pengutronix.de References: <7a6848be-61a6-6e2b-eb1c-7f9490676f82@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7a6848be-61a6-6e2b-eb1c-7f9490676f82@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] Globally define GIT_CEILING_DIRECTORIES? X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hi, On Mon, Feb 13, 2023 at 02:58:49PM +0100, Sven Püschel wrote: > I would suggest globally setting the GIT_CEILING_DIRECTORIES environment > variable when building packages. > > Besides lshw, sockperf is now the second time I've encountered the > buildsystem to check the current git repository. But as Git also checks the > parent directories when searching for Git repositories, these checks may > result in getting an unwanted Git repository (usually the BSP), resulting in > package versions with a Git commit/version that has nothing to do with the > actual package. > > With GIT_CEILING_DIRECTORIES set to the parent directory of the extracted > sources, Git will stop searching for parent Git repositories, when it > encounters this directory. See my sockperf v2 patch for an example of using > this environment variable. > > Given this is a global change, does anyone see a potential problem? I've been thinking about similar issues from time to time. Mostly when I'm digging into package sources. It happens occasionally that I do a 'git grep', which succeeds without finding something... So I'd prefer a solution that works here as well. One idea is to create an empty platform-XXX/.git file. Git will stop here with an error: "fatal: invalid gitfile format: .../platform-XXX/.git". It's not the best error, but it should solve both our issues. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |