Hi mol,

On 3/3/23 08:25, Michael Olbrich wrote:
> 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.

Cool, thanks! I'll give it a try!

Best regards,
Michael

> 
> Michael
> 

Reply via email to