Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559054 - sys-apps/portage-2.2.20.1: emaint sync refuses to sync if location contains a .git directory
Summary: sys-apps/portage-2.2.20.1: emaint sync refuses to sync if location contains a...
Status: RESOLVED DUPLICATE of bug 296085
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-28 20:07 UTC by gentoo-user
Modified: 2015-08-29 17:23 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo-user 2015-08-28 20:07:07 UTC
When syncing my repo (which happens to be a git repo) over rsync to my other computers, emaint throws an error that the destination appears to be under revision control and then aborts.

Reproducible: Always

Steps to Reproduce:
1. Have ".git" directory in location that will be synced
2. emaint sync -r repo
Actual Results:  
>>> Syncing repository 'gentoo' into '/var/portage'...
!!! /var/portage appears to be under revision control (contains .git).
!!! Aborting rsync sync.

Action: sync for repo: gentoo, returned code = 1

Expected Results:  
emaint does what I tell it to do and synchronizes the repo
Comment 1 Zac Medico gentoo-dev 2015-08-28 20:13:21 UTC
We can add a repos.conf setting for this. You'll need to have --exclude=/.git in your rsync excludes for this repo.
Comment 2 Zac Medico gentoo-dev 2015-08-28 20:28:18 UTC

*** This bug has been marked as a duplicate of bug 296085 ***
Comment 3 gentoo-user 2015-08-29 14:45:11 UTC
(In reply to Zac Medico from comment #1)
> We can add a repos.conf setting for this. You'll need to have
> --exclude=/.git in your rsync excludes for this repo.

What if I want to synchronize the .git directory as well? (So I can retain the git metainformation and e.g. use git log to find out the recent changes on an ebuild)
My current use-case is to synchronize from git on one of my machines, and then use egencache to generate metadata there and then using that machine as an rsync server for my other machines (saving me from generating metadata on all my machines).
Comment 4 Zac Medico gentoo-dev 2015-08-29 17:23:42 UTC
(In reply to gentoo-user from comment #3)
> (In reply to Zac Medico from comment #1)
> > We can add a repos.conf setting for this. You'll need to have
> > --exclude=/.git in your rsync excludes for this repo.
> 
> What if I want to synchronize the .git directory as well? (So I can retain
> the git metainformation and e.g. use git log to find out the recent changes
> on an ebuild)
> My current use-case is to synchronize from git on one of my machines, and
> then use egencache to generate metadata there and then using that machine as
> an rsync server for my other machines (saving me from generating metadata on
> all my machines).

That will be fine, since the .git directory will not have special treatment when the repository is configured with an rsync URI. So, by default, the .git directory will be synced normally by rsync clients, giving them access to the git history. Of course, clients can add --exclude=/.git to the rsync options if they don't want the git history.