Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485402 - emerge --sync - git update of new repository fails: fatal: Not a git repository (or any of the parent directories): .git
Summary: emerge --sync - git update of new repository fails: fatal: Not a git reposito...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 514926 (view as bug list)
Depends on:
Blocks: 240187 484436
  Show dependency tree
 
Reported: 2013-09-19 11:59 UTC by Thomas Deutschmann (RETIRED)
Modified: 2016-03-14 04:12 UTC (History)
3 users (show)

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


Attachments
portage_add_git_clone.patch (portage_add_git_clone.patch,2.03 KB, patch)
2014-01-13 22:50 UTC, Chris Reffett (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2013-09-19 11:59:44 UTC
Hi,

some weeks ago, portage introduced /etc/portage/repos.conf support.

Today I tried to use that feature, to get rid off layman.

Reproducible: Always

Steps to Reproduce:
1. mkdir -p /usr/overlays/test-overlay

2. Create "/etc/portage/repos.conf/test.conf" with the following content:
[test-overlay]
location = /usr/overlays/test-overlay
sync-type = git
sync-uri = https://git.overlays.gentoo.org/gitroot/dev/TomWij.git


3. Run "emerge --sync"

Actual Results:  
>>> Synchronization of repository 'test-overlay' located in '/usr/overlays/test-overlay'...
>>> Starting git pull in /usr/overlays/test-overlay...
fatal: Not a git repository (or any of the parent directories): .git
!!! git pull error in /usr/overlays/test-overlay.


Expected Results:  
Because I did not find a notice in the man page, that I have to make the initial clone, I expect that portage should have notice, that /usr/overlays/test-overlay is empty and therefor create (clone) the repository first.

Workaround:
Actual you have to manually create the initial repository (=after step 1 go to /usr/overlays/test-overlay and manually run "git clone ..."). After that, every "emerge --sync" will also update the repository as expected.
Comment 1 Chris Reffett (RETIRED) gentoo-dev Security 2014-01-13 22:50:17 UTC
Created attachment 367814 [details, diff]
portage_add_git_clone.patch

This patch makes portage test whether the target dir is a git repo and clones if it isn't. On hold for Portage submission since we may be redoing the sync setup in the very near future.
Comment 2 Zac Medico gentoo-dev 2015-08-28 20:25:44 UTC
This should be fixed since 2.2.16 when we merged the modular sync support.
Comment 3 Zac Medico gentoo-dev 2016-03-14 04:09:05 UTC
*** Bug 514926 has been marked as a duplicate of this bug. ***
Comment 4 Zac Medico gentoo-dev 2016-03-14 04:12:06 UTC
(In reply to Chris Reffett from comment #1)
> Created attachment 367814 [details, diff] [details, diff]
> portage_add_git_clone.patch

That's in the master branch:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=112cd2845874291719582e5cd11c2c757157c68d