Hi Sven.
On 2/13/23 2:58 PM, 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?
Best regards
Sven
Just to summarize so I understand this.
You want to limit the searching for git repos,
so that if it isn't found in the current posix PWD (cwd), it's not a git repo?
I'm assuming it's expandable by doing an export to $PWD?
Have you tried this as an global?
Afaict, sockperf treats this locally?
Also, do you have any anecdotal or factual history from other build
environments?
Some of them rely extensively on git hashes, ie, repos.
They've likely stumbled upon the same question.
Regards,
Christian