Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 930992 - sys-apps/portage-3.0.64: potential git noise when using ebuild(1)/emerge
Summary: sys-apps/portage-3.0.64: potential git noise when using ebuild(1)/emerge
Status: IN_PROGRESS
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, PATCH
Depends on: 930802
Blocks:
  Show dependency tree
 
Reported: 2024-04-30 23:45 UTC by Ionen Wolkens
Modified: 2024-05-12 16:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sync: git: add safe.directory for get head commit (file_930992.txt,1.03 KB, patch)
2024-05-06 12:51 UTC, Alex Xu (Hello71)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ionen Wolkens gentoo-dev 2024-04-30 23:45:17 UTC
I keep ::gentoo configured with `sync-type = git` but sometimes (e.g. in a overlay chroot with same repos.conf) I replace ::gentoo by something else (like a --bind mount), and then expect this to not be a problem given I won't `emerge --sync` there.

However, haven't looked into why, but 3.0.64 started to run git even when emerging packages:

$ ebuild iwdevtools-0.12.11.ebuild clean
fatal: not a git repository (or any of the parent directories): .git

^ has .git removed

$ ebuild bash-5.2_p26.ebuild clean
fatal: detected dubious ownership in repository at '/var/db/repos/gentoo'
To add an exception for this directory, call:

	git config --global --add safe.directory /var/db/repos/gentoo

^ this chroot never did --sync and just bind mount the host's, so safe dirs never needed to be added

Could potentially be considered invalid given repos.conf is misconfigured in this context (does not happen if drop sync-type = git, or at least not for me), albeit is it really wanted or necessary to run git with every ebuild command? Otherwise, could noise be silenced?

arthurzam had a similar problem and:
16:10 <@arthurzam> ionen: just file a bug
16:10 <@arthurzam> status, repo_revision = sync.retrieve_head( is the culprit
16:12 <@arthurzam> sam_: yes, I commented that line, replaced with "pass" and it now stops calling git
Comment 1 Alex Xu (Hello71) 2024-05-06 12:51:01 UTC
Created attachment 892344 [details, diff]
sync: git: add safe.directory for get head commit
Comment 2 Larry the Git Cow gentoo-dev 2024-05-12 16:20:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=95b4337d376a146db8fda7717393366175cbd285

commit 95b4337d376a146db8fda7717393366175cbd285
Author:     Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
AuthorDate: 2024-05-05 20:24:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-12 16:20:02 +0000

    sync: git: add safe.directory for get head commit
    
    Closes: https://bugs.gentoo.org/930992
    Fixes: 1339a02103 ("sync: git: include signing key and git revision in log output")
    Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/portage/sync/modules/git/git.py | 1 +
 1 file changed, 1 insertion(+)