From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 03 Mar 2023 08:26:27 +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 1pXzoA-007HPO-Lw for lore@lore.pengutronix.de; Fri, 03 Mar 2023 08:26:27 +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 1pXzoA-0000zy-Sy; Fri, 03 Mar 2023 08:26:26 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXznf-0000zX-NJ; Fri, 03 Mar 2023 08:25:55 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pXzne-001VVS-Vp; Fri, 03 Mar 2023 08:25:54 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pXzne-000Qid-Dl; Fri, 03 Mar 2023 08:25:54 +0100 Date: Fri, 3 Mar 2023 08:25:54 +0100 From: Michael Olbrich To: Michael Riesch Message-ID: Mail-Followup-To: Michael Riesch , ptxdist@pengutronix.de References: <7a6848be-61a6-6e2b-eb1c-7f9490676f82@pengutronix.de> <20230214142138.GO21075@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain 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 On Mon, Feb 27, 2023 at 10:22:43PM +0100, Michael Riesch wrote: > On 2/14/23 15:21, Michael Olbrich wrote: > > 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. > > I gave this a quick test and it solves the problems with the libcamera > project. > > Any idea when such a solution could land in ptxdist? It's in master now and will be in the next release, later today. 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 |