Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 448094

Summary: git-2_update_repo fails if HEAD file is missing
Product: Gentoo Linux Reporter: Jimmy.Jazz
Component: EclassesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED WONTFIX    
Severity: normal CC: Jimmy.Jazz
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: eclass functions used for the test

Description Jimmy.Jazz 2012-12-21 16:01:40 UTC
If /usr/portage/distfiles/egit-src (or git-src) has missing files in the git bare repository of the 9999 ebuild it is not possible to emerge.

ebuild script returns something like,

Not a git repository
Stopping at filesystem boundary

I'm using dev-vcs/git-1.8.0.2 and sys-apps/portage-2.2.0_alpha149

Reproducible: Always

Steps to Reproduce:
1. emerge -av sys-fs/btrfs-progs-9999 for example
2. 
3.


Expected Results:  
As workaround, follow one of the steps:

1a. cd /usr/portage/distfiles/egit-src/btrfs-progs.git/
1b. git --bare init && emerge -av sys-fs/btrfs-progs-9999

2a. rm -rf /usr/portage/distfiles/egit-src/btrfs-progs.git
2b. ebuild /usr/portage/../btrfs-progs-9999.ebuild prepare

Also, you get a warning for that particular package,
fatal: ambiguous argument 'master'
Use '--' to separate paths from revisions
Comment 1 Jimmy.Jazz 2012-12-21 16:08:26 UTC
Created attachment 332934 [details]
eclass functions used for the test

informative
Comment 2 Jimmy.Jazz 2012-12-21 16:11:25 UTC
Warning returned when execution step 2b: Use '--' to separate paths from revisions, like this ...

#  ebuild /usr/portage/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild prepare * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
>>> Unpacking source...
fatal: ambiguous argument 'master': unknown revision or path not in the working
tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
From git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs
 * [new branch]      master     -> master
 * [new tag]         v0.20-rc1  -> v0.20-rc1
GIT update -->
   repository:               git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
   updating from commit:     master
   to commit:                91d9eec1ff044394f2b98ee7fcb76713dd33b994
   branch:                   master
   storage directory:        "/usr/portage/distfiles/egit-src/btrfs-progs.git"
   checkout type:            bare repository
Cloning into '/tmp/portage/sys-fs/btrfs-progs-9999/work/btrfs-progs-9999'...
done.
Branch branch-master set up to track remote branch master from origin.
Switched to a new branch 'branch-master'
>>> Unpacked to /tmp/portage/sys-fs/btrfs-progs-9999/work/btrfs-progs-9999
>>> Source unpacked in /tmp/portage/sys-fs/btrfs-progs-9999/work
>>> Preparing source in /tmp/portage/sys-fs/btrfs-progs-9999/work/btrfs-progs-9999 ...
>>> Source prepared.
Comment 3 Jimmy.Jazz 2012-12-21 16:14:54 UTC
Output when it fails. (I don't have the files anymore...)

+ debug-print 'git-2_migrate_repository: working in bare repository for "/usr/portage/distfiles/egit-src/btrfs-progs.git"'
+ [[ unpack = depend ]]
+ [[ ! -d /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ [[ 1 -eq 0 ]]
+ [[ '' == on ]]
+ [[ -n '' ]]
+ [[ -w /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ printf '%s\n' 'git-2_migrate_repository: working in bare repository for "/usr/portage/distfiles/egit-src/btrfs-progs.git"'
+ chgrp portage /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ chmod g+w /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ EGIT_LOCAL_OPTIONS+=' --bare'
+ MOVE_COMMAND='git clone -l -s -n /usr/portage/distfiles/egit-src/btrfs-progs.git'
+ EGIT_UPDATE_CMD='git fetch -t -f -u origin master:master'
+ UPSTREAM_BRANCH=master
+ EGIT_LOCAL_NONBARE=
+ git-2_fetch
+ debug-print-function git-2_fetch
+ debug-print 'git-2_fetch: entering function, parameters: '
+ [[ unpack = depend ]]
+ [[ ! -d /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ [[ 1 -eq 0 ]]
+ [[ '' == on ]]
+ [[ -n '' ]]
+ [[ -w /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ printf '%s\n' 'git-2_fetch: entering function, parameters: '
+ chgrp portage /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ chmod g+w /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ local oldsha cursha repo_type
+ [[ -n '' ]]
+ repo_type='bare repository'
+ [[ ! -d /usr/portage/distfiles/egit-src/btrfs-progs.git ]]
+ [[ -n '' ]]
+ pushd /usr/portage/distfiles/egit-src/btrfs-progs.git
++ git rev-parse master
fatal: Not a git repository (or any parent up to mount point /usr/portage)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
+ oldsha=
+ git-2_update_repo
+ debug-print-function git-2_update_repo
+ debug-print 'git-2_update_repo: entering function, parameters: '
+ [[ unpack = depend ]]
+ [[ ! -d /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ [[ 1 -eq 0 ]]
+ [[ '' == on ]]
+ [[ -n '' ]]
+ [[ -w /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ printf '%s\n' 'git-2_update_repo: entering function, parameters: '
+ chgrp portage /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ chmod g+w /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ local repo_uri
+ [[ -n '' ]]
+ EGIT_REPO_URI_SELECTED=
+ for repo_uri in '${EGIT_REPO_URI}'
+ git config remote.origin.url git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
error: could not lock config file .git/config: Aucun fichier ou dossier de ce type
+ debug-print 'git fetch -t -f -u origin master:master'
+ [[ unpack = depend ]]
+ [[ ! -d /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ [[ 1 -eq 0 ]]
+ [[ '' == on ]]
+ [[ -n '' ]]
+ [[ -w /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ printf '%s\n' 'git fetch -t -f -u origin master:master'
+ chgrp portage /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ chmod g+w /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ git fetch -t -f -u origin master:master
fatal: Not a git repository (or any parent up to mount point /usr/portage)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
+ for repo_uri in '${EGIT_REPO_URI}'
+ git config remote.origin.url https://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
error: could not lock config file .git/config: Aucun fichier ou dossier de ce type
+ debug-print 'git fetch -t -f -u origin master:master'
+ [[ unpack = depend ]]
+ [[ ! -d /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ [[ 1 -eq 0 ]]
+ [[ '' == on ]]
+ [[ -n '' ]]
+ [[ -w /tmp/portage/sys-fs/btrfs-progs-9999/temp ]]
+ printf '%s\n' 'git fetch -t -f -u origin master:master'
+ chgrp portage /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ chmod g+w /tmp/portage/sys-fs/btrfs-progs-9999/temp/eclass-debug.log
+ git fetch -t -f -u origin master:master
fatal: Not a git repository (or any parent up to mount point /usr/portage)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
+ [[ -n '' ]]
+ die 'git-2_update_repo: can'\''t update from git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
        https://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git'
+ local 'IFS=
'
+ [[ '' -eq 1 ]]
+ set +e
+ '[' -n 'autoconf automake aclocal libtoolize' ']'
+ unset -f autoconf automake aclocal libtoolize
+ unset QA_INTERCEPTORS
Comment 4 Pacho Ramos gentoo-dev 2016-08-06 08:26:55 UTC
Use git-r3.eclass instead