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

Bug 877493

Summary: git-r3.eclass: can't fetch submodule commit, which is out of branches
Product: Gentoo Linux Reporter: Nikita Zlobin <cook60020tmp>
Component: EclassesAssignee: Michał Górny <mgorny>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nikita Zlobin 2022-10-17 19:45:26 UTC
This repo: https://github.com/DISTRHO/MVerb.git
(packaged in audio-overlay)

Can't be recursively cloned by git-r3 as at commit 42a9e910fd69ca72b6d211f15ad2ecef7b17ed5d, because stumbles trying to fetch commit  856c759e1e360b0a766f61bb2b2cfffe15790368 in pugl, which is not included to any branch, but referenced by submodules chain (mverb->dpf->pugl).

However, "git clone --recursive" is fine.
After cloning DISTRHO_pugl itself, I was able to make necessary commit available by doing "git fetch origin 856c759e1e360b0a766f61bb2b2cfffe15790368".
After I repeated same command inside copy in git3-src (by git-r3), with "origin" replaced to full clone url, git-r3 could detect necessary commit and mverb package was successfully merged.

Reproducible: Always

Steps to Reproduce:
1. Create git-r3 based ebuild and edit:
  EGIT_REPO_URI=https://github.com/DISTRHO/MVerb.git
  EGIT_COMMIT=42a9e910fd69ca72b6d211f15ad2ecef7b17ed5d
2. Try to emerge.
Actual Results:  
 * Fetching https://github.com/DISTRHO/pugl.git ...
git fetch https://github.com/DISTRHO/pugl.git --prune +refs/heads/*:refs/heads/* +refs/tags/*:refs/tags/* +refs/notes/*:refs/notes/* +refs/pull/*/head:refs/pull/* +HEAD:refs/git-r3/HEAD
git update-ref --no-deref refs/git-r3/media-plugins/mverb/0/dpf/dgl_src_pugl-upstream/__main__ 856c759e1e360b0a766f61bb2b2cfffe15790368
fatal: update_ref failed for ref 'refs/git-r3/media-plugins/mverb/0/dpf/dgl_src_pugl-upstream/__main__': cannot update ref 'refs/git-r3/media-plugins/mverb/0/dpf/dgl_src_pugl-upstream/__main__': trying to write ref 'refs/git-r3/media-plugins/mverb/0/dpf/dgl_src_pugl-upstream/__main__' with nonexistent object 856c759e1e360b0a766f61bb2b2cfffe15790368
 * ERROR: media-plugins/mverb-9999::audio-overlay failed (unpack phase):
 *   Referencing 856c759e1e360b0a766f61bb2b2cfffe15790368 failed (wrong ref?).


Expected Results:  
Should be able to fetch any commit as long as it's not completely cleaned out at git source.

"git branch -a --contains <commit-id>" will not list anything for orphane commit until it's checked out (detached HEAD).