Hi, when I wan to sync Gentoo:RAP repos I get: $ emaint sync -r rap >>> Syncing repository 'rap' into '/apps/gentoo/usr/portage-stage'... /apps/gentoo/usr/bin/git clone --depth 1 https://anongit.gentoo.org/git/proj/android.git . fatal: destination path '.' already exists and is not an empty directory. !!! git clone error in /apps/gentoo/usr/portage-stage q: Updating ebuild cache in /apps/gentoo/usr/portage-stage ... q: Finished 139 entries in 0.008619 seconds * IMPORTANT: 14 news items need reading for repository 'gentoo'. * Use eselect news read to view new items. Action: sync for repo: rap, returned code = 128 $ ls -latr /apps/gentoo/usr/portage-stage total 168 drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 x11-proto drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 x11-misc drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 x11-base drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-process drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-libs drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-kernel drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-fs ... To work around I just did rm -rf /apps/gentoo/usr/portage-stage and retried: $ emaint sync -r rap >>> Syncing repository 'rap' into '/apps/gentoo/usr/portage-stage'... /apps/gentoo/usr/bin/git clone --depth 1 https://anongit.gentoo.org/git/proj/android.git . Cloning into '.'... remote: Counting objects: 763, done. remote: Compressing objects: 100% (633/633), done. remote: Total 763 (delta 98), reused 658 (delta 85) Receiving objects: 100% (763/763), 852.71 KiB | 0 bytes/s, done. Resolving deltas: 100% (98/98), done. Checking out files: 100% (606/606), done. === Sync completed for rap q: Updating ebuild cache in /apps/gentoo/usr/portage-stage ... q: Finished 134 entries in 0.016692 seconds $ Did I really have to "rm -rf apps/gentoo/usr/portage-stage"? However, please also consider these: 1. Please improve the messages. In the above "Cloning into '.'..." is next to useless. 2. >>>> Syncing repository 'rap' into '/apps/gentoo/usr/portage-stage'... should be replaced with >>>> Syncing repository 'rap' into '/apps/gentoo/usr/portage-stage'/... 3. fatal: destination path '.' already exists and is not an empty directory. should probably be fatal: destination path '/apps/gentoo/usr/portage-stage/' already exists and is not an empty directory. 4. !!! git clone error in /apps/gentoo/usr/portage-stage should probably be !!! git clone error into /apps/gentoo/usr/portage-stage failed with: $retcode, $errmsg Note: My EPREFIX is '/apps/gentoo'
hmm, it sounds like this is an issue with using depth=1. There should be a .git directory in the checkout. If not, then that would certainly cause a problem with git and generate the error you are getting. There have been far too many problems associated with using depth=1. As a result the workarounds were becoming far morre time consuming than a full git history. And that was for the main gentoo tree which has many, many more commits per day than this project. This project shows at most a dozen commits per month. So there is little benefit to a shallow clone. In fact in portage-2.3.3 we've removed most of the code involved in shallow clones, it was just too problematic. Please try portage-2.3.3 without the depth=1 setting, see if you still get the sync error.
First of all, here is the complete listing of that directory now renamed to portage-stage.old (showing there always was .git/ indeed): $ ls -latr /apps/gentoo/usr/portage-stage.old/ total 168 drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 x11-proto drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 x11-misc drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 x11-base drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-process drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-libs drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-kernel drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-fs drwxrwxr-x 5 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-devel drwxrwxr-x 8 mmokrejs mmokrejs 4096 Oct 24 12:29 sys-apps drwxrwxr-x 2 mmokrejs mmokrejs 4096 Oct 24 12:29 scripts drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sci-visualization drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sci-physics drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sci-mathematics drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sci-libs drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 sci-electronics drwxrwxr-x 5 mmokrejs mmokrejs 4096 Oct 24 12:29 profiles drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 net-proxy drwxrwxr-x 6 mmokrejs mmokrejs 4096 Oct 24 12:29 net-misc drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 net-mail drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 net-libs drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 net-dialup drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 net-analyzer drwxrwxr-x 2 mmokrejs mmokrejs 4096 Oct 24 12:29 metadata drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 media-video drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 media-libs drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 media-gfx drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 kde-base drwxrwxr-x 2 mmokrejs mmokrejs 4096 Oct 24 12:29 eclass drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 dev-util drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 dev-qt drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 dev-python drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 dev-libs drwxrwxr-x 4 mmokrejs mmokrejs 4096 Oct 24 12:29 dev-lang drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 dev-java drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 dev-embedded drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 app-text drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 app-portage drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 app-misc drwxrwxr-x 3 mmokrejs mmokrejs 4096 Oct 24 12:29 app-benchmarks -rw-rw-r-- 1 mmokrejs mmokrejs 12 Oct 24 12:29 .gitignore drwxrwxr-x 41 mmokrejs mmokrejs 4096 Jan 6 15:42 . -rw-rw-r-- 1 mmokrejs mmokrejs 0 Jan 6 15:42 .unpacked drwxrwxr-x 13 mmokrejs mmokrejs 4096 Jan 8 10:57 .. $ As I mentioned in the initial comment, I got a new checkout today: $ ls -latr /apps/gentoo/usr/portage-stage/ total 168 drwxrwxr-x 13 mmokrejs mmokrejs 4096 Jan 8 10:57 .. -rw-r--r-- 1 mmokrejs mmokrejs 12 Jan 8 10:57 .gitignore drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 app-benchmarks drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 app-misc drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 app-portage drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 app-text drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 dev-embedded drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 dev-java drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 dev-lang drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 dev-libs drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 dev-python drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 dev-qt drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 dev-util drwxr-xr-x 2 mmokrejs mmokrejs 4096 Jan 8 10:57 eclass drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 kde-base drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 media-gfx drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 media-libs drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 media-video drwxr-xr-x 2 mmokrejs mmokrejs 4096 Jan 8 10:57 metadata drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 net-analyzer drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 net-dialup drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 net-libs drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 net-mail drwxr-xr-x 6 mmokrejs mmokrejs 4096 Jan 8 10:57 net-misc drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 net-proxy drwxr-xr-x 5 mmokrejs mmokrejs 4096 Jan 8 10:57 profiles drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 sci-electronics drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 sci-libs drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 sci-mathematics drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 sci-physics drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 sci-visualization drwxr-xr-x 2 mmokrejs mmokrejs 4096 Jan 8 10:57 scripts drwxr-xr-x 8 mmokrejs mmokrejs 4096 Jan 8 10:57 sys-apps drwxr-xr-x 5 mmokrejs mmokrejs 4096 Jan 8 10:57 sys-devel drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 sys-fs drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 sys-kernel drwxr-xr-x 4 mmokrejs mmokrejs 4096 Jan 8 10:57 sys-libs drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 sys-process drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 x11-misc drwxr-xr-x 3 mmokrejs mmokrejs 4096 Jan 8 10:57 x11-proto drwxr-xr-x 41 mmokrejs mmokrejs 4096 Jan 8 10:57 . drwxr-xr-x 7 mmokrejs mmokrejs 4096 Jan 8 14:57 .git $ I wonder if now I am supposed to reproduce the error or not ... Does the error happen only if the repo was changed in between? Currently I have still a current copy, so am not certain whether that prevents me to reproduce the issue. $ emaint sync -r rap >>> Syncing repository 'rap' into '/apps/gentoo/usr/portage-stage'... /apps/gentoo/usr/bin/git pull Already up-to-date. === Sync completed for rap q: Updating ebuild cache in /apps/gentoo/usr/portage-stage ... q: Finished 134 entries in 0.012266 seconds Action: sync for repo: rap, returned code = 0 $ Not sure what I should do now. @heroxbd may comment whether this is anyhow related to bootstrap-rap.sh fetching eventually a tar.bz2 shapshot and installing it as /apps/gentoo/usr/portage-stage/ ? Just in case the snapshots themselves or snapshots making host needs a tweak.
(In reply to Martin Mokrejš from comment #2) > Not sure what I should do now. @heroxbd may comment whether this is anyhow > related to bootstrap-rap.sh fetching eventually a tar.bz2 shapshot and > installing it as /apps/gentoo/usr/portage-stage/ ? Just in case the > snapshots themselves or snapshots making host needs a tweak. If bootstrap-rap.sh unpacks a tarball, but repos.conf refers to a git repository, then the "fatal: destination path '.' already exists and is not an empty directory." error is expected, because this state is invalid. It looks like bootstrap-rap.sh is responsible for creating this invalid state, when it configures repos.conf for git here: if is-rap && [[ ! -f ${ROOT}/etc/portage/repos.conf ]] ; then cat >"${ROOT}"/etc/portage/repos.conf <<-EOF [DEFAULT] main-repo = gentoo eclass-overrides = rap [gentoo] location = ${ROOT}/usr/portage sync-type = rsync sync-uri = rsync://rsync.gentoo.org/gentoo-portage [rap] location = ${ROOT}/usr/portage-stage sync-type = git sync-uri = https://anongit.gentoo.org/git/proj/android.git auto-sync = no EOF fi
It would solve the problem if http://dev.gentoo.org/~heroxbd/android-master.tar.bz2 contained a .git directory.