emerge --sync assumes that if a .git dir exists, that git will be used to pull the portage tree. It ignores SYNC. This makes having private git sync points on portage problematic -- if I want to use git to pull when I sync, there should be a SYNC value to specify that. It should definitely not silently override explicit values, particularly with unclear internal errors like "git pull error" or even worse "Type emerge dev-util/git to enable git support" (since rsync --sync doesn't filter out .git!). My use case is that I use normal rsync's of portage, but I like to be able to roll back portage temporarily when upstream updates would knock out my system, at least until I figure a work-around. Hunting through gentoo's cvs to temporarily rescue a system is extremely labor intensive, particularly when the problem is initially unclear. The logic here is unclear -- if I'm using git to update portage, why would I indirect through emerge at all? The metadata is mostly in the tree, so I would use an explicit git pull and emerge --metadata; presumably I know what the hell I'm doing if I'm using non-standard interfaces. And what if I were using a non-standard GIT_DIR? There's no way to specify that. It seems like a hack for a very particular use case. Reproducible: Always Steps to Reproduce: 1. Have a .git subdirectory in /usr/portage 2. emerge --sync 3. Actual Results: git pull silently replaces the SYNC in make.conf. Expected Results: That the SYNC I explicitly place in make.conf is the one that is used.
Oh -- and on top of that, it doesn't appear to be documented behavior at all, which makes the behavior particularly mysterious (not even commented in init.py where it occurs).
The current behavior is for funtoo, but we can change it to rely on SYNC and advise the funtoo people to set an appropriate SYNC value in their base profile.
(In reply to comment #0) > The logic here is unclear -- if I'm using git to update portage, why would I > indirect through emerge at all? The metadata is mostly in the tree, so I would > use an explicit git pull and emerge --metadata; presumably I know what the hell > I'm doing if I'm using non-standard interfaces. And what if I were using a > non-standard GIT_DIR? There's no way to specify that. The emerge --sync code path for git has some special timestamp handling code so that the metadata cache works. This is necessary since the timestamps of the ebuilds are compared to the timestamps of the cache entries in $PORTDIR/metadata/cache in order to validate the cache. There has been some discussion about a new cache validation mechanism that would solve this problem: http://archives.gentoo.org/gentoo-dev/msg_cfa80e33ee5fa6f854120ddfb9b468b3.xml According to the git faq they have specific reasons for not preserving timestamps: http://git.or.cz/gitwiki/GitFaq#Whyisn.27tGitpreservingmodificationtimeonfiles.3F
We can add a repos.conf setting for this. You'll need to have --exclude=/.git in your rsync excludes for this repo.
*** Bug 559054 has been marked as a duplicate of this bug. ***
There's a patch in the following branch: https://github.com/zmedico/portage/tree/bug_296085 It can be installed like this: echo '=sys-apps/portage-9999 **' >> /etc/portage/package.accept_keywords portage_LIVE_BRANCH=bug_296085 \ portage_LIVE_REPO=https://github.com/zmedico/portage.git \ emerge -1 =sys-apps/portage-9999
(In reply to Zac Medico from comment #6) > There's a patch in the following branch: > > https://github.com/zmedico/portage/tree/bug_296085 > > It can be installed like this: > > echo '=sys-apps/portage-9999 **' >> /etc/portage/package.accept_keywords > portage_LIVE_BRANCH=bug_296085 \ > portage_LIVE_REPO=https://github.com/zmedico/portage.git \ > emerge -1 =sys-apps/portage-9999 Patch works for me.
This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=09891390cbd41240bfcacb32d3feb5bbfd4034aa
Released in portage-2.2.21