mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Michael Riesch <michael.riesch@wolfvision.net>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Globally define GIT_CEILING_DIRECTORIES?
Date: Fri, 3 Mar 2023 08:25:54 +0100	[thread overview]
Message-ID: <ZAGhApG0xRu57CQ6@pengutronix.de> (raw)
In-Reply-To: <a2ad4a21-644d-dc51-9971-2a5b57f11393@wolfvision.net>

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 |



  reply	other threads:[~2023-03-03  7:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 13:58 Sven Püschel
2023-02-13 14:24 ` Christian Melki
2023-02-13 15:03   ` Sven Püschel
2023-02-13 19:27     ` Christian Melki
2023-02-14 10:32 ` Michael Riesch
2023-02-14 14:21 ` Michael Olbrich
2023-02-27 21:22   ` Michael Riesch
2023-03-03  7:25     ` Michael Olbrich [this message]
2023-03-06  8:34       ` Michael Riesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZAGhApG0xRu57CQ6@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=michael.riesch@wolfvision.net \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox