Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653012 - git-r3.eclass - expose variable to provide release tags or improve example usage
Summary: git-r3.eclass - expose variable to provide release tags or improve example usage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-12 11:18 UTC by Martin Mokrejš
Modified: 2018-04-12 15:18 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 Martin Mokrejš 2018-04-12 11:18:43 UTC
Hi,
  I need to use git to obtain sources of a package. I want to tell git-r3 "${PV}" and it should do the proper checkout based on a version tag:
https://github.com/broadinstitute/picard/tree/2.17.11


The manual page https://devmanual.gentoo.org/eclass-reference/git-r3.eclass/index.html is not really helpful in this regard, probably it is not possible. 

Anyway, I tried and received:

...
EGIT_REPO_URI="https://github.com/broadinstitute/picard.git"
EGIT_BRANCH="${PV}"
# building outside of git is not possible,
# see https://github.com/broadinstitute/picard/issues/605
...


>>> Emerging (1 of 1) sci-biology/picard-2.17.11::science
 * Using: oracle-jdk-bin-1.8
>>> Unpacking source...
 * Fetching https://github.com/broadinstitute/picard.git ...
git fetch https://github.com/broadinstitute/picard.git +refs/heads/2.17.11:refs/heads/2.17.11
fatal: Couldn't find remote ref refs/heads/2.17.11
 * ERROR: sci-biology/picard-2.17.11::science failed (unpack phase):
 *   Unable to fetch from any of EGIT_REPO_URI
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_unpack
 *   environment, line 4353:  Called git-r3_src_unpack
 *   environment, line 2138:  Called git-r3_src_fetch
 *   environment, line 2132:  Called git-r3_fetch
 *   environment, line 2054:  Called die
 * The specific snippet of code:
 *       [[ -n ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI";
Comment 1 Larry the Git Cow gentoo-dev 2018-04-12 11:22:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/sci.git/commit/?id=32cd1f6f1c693d74575f0c0b5be30bf4d61c1999

commit 32cd1f6f1c693d74575f0c0b5be30bf4d61c1999
Author:     Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
AuthorDate: 2018-04-12 11:22:01 +0000
Commit:     Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
CommitDate: 2018-04-12 11:22:01 +0000

    sci-biology/picard: version bump (not working yet)
    
    Bug: https://github.com/broadinstitute/picard/issues/605
    Bug: https://bugs.gentoo.org/653012
    Package-Manager: Portage-2.3.27, Repoman-2.3.9

 sci-biology/picard/Manifest              |  5 ++-
 sci-biology/picard/picard-2.10.2.ebuild  | 58 ------------------------------
 sci-biology/picard/picard-2.17.11.ebuild | 61 ++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 61 deletions(-)}
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-12 13:46:35 UTC
Read the manpage just below EGIT_BRANCH.
Comment 3 Larry the Git Cow gentoo-dev 2018-04-12 15:18:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/sci.git/commit/?id=c745e42833996f3ceceb7f701baddbe5fe1da566

commit c745e42833996f3ceceb7f701baddbe5fe1da566
Author:     Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
AuthorDate: 2018-04-12 15:18:08 +0000
Commit:     Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
CommitDate: 2018-04-12 15:18:08 +0000

    sci-biology/picard: use EGIT_COMMIT to fetch by a release tag
    
    Closes: https://bugs.gentoo.org/653012
    Package-Manager: Portage-2.3.27, Repoman-2.3.9

 sci-biology/picard/picard-2.18.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)