Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 309163 - git.eclass: can't use experimental branch if last commit is on master
Summary: git.eclass: can't use experimental branch if last commit is on master
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alex Alexander (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-12 18:33 UTC by Paweł Tomak
Modified: 2010-03-14 14:38 UTC (History)
2 users (show)

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 Paweł Tomak 2010-03-12 18:33:14 UTC
Hi,

I tried today to emerge www-client/uzbl-9999 with the experimental flag set. It emerged without a problem, but what I've found is that it emerged current master branch, and not experimental as it was supposed to. I did a little search in the ebuild and git.eclass. The ebuild output shows:
 * GIT update -->
 *    repository:               git://github.com/Dieterbe/uzbl.git
 *    at the commit:            bb9959c00b92633fd0970ef99e6b7a2c5bbc8416
 *    commit:                   master
 *    branch:                   experimental
 *    storage directory:        "/usr/local/portage/distfiles/git-src/uzbl"

Last commit was to master branch, and because of that if statement in git_branch function in git.eclass sets src variable to ${EGIT_COMMIT}, which is set to 'master'
if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
	branchname=tree-${EGIT_COMMIT}
	src=${EGIT_COMMIT}
fi

Reproducible: Always

Steps to Reproduce:
1.set experimental flag in uzbl-9999 (tried only this ebuild)
2.emerge =www-client/uzbl-9999

Actual Results:  
Emerged version is from master branch

Expected Results:  
Emerged version should be from experimental branch
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2010-03-14 11:09:34 UTC
Why should this be issue of git eclass?
You can specify COMMIT or branch.
If you specify some COMMIT then it has priority over the branch.

Probably should be issue for uzbl maintainer.
Comment 2 Paweł Tomak 2010-03-14 11:26:00 UTC
(In reply to comment #1)
> Why should this be issue of git eclass?
> You can specify COMMIT or branch.
> If you specify some COMMIT then it has priority over the branch.
> 
> Probably should be issue for uzbl maintainer.
> 
And what if I won't specify COMMIT but I specify BRANCH? Like in this ebuild? There is EGIT_BRANCH specified, but still it emerge master branch
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2010-03-14 11:28:42 UTC
The problem is in the ebuild.
The EGIT_BRANCH variable is supposed to be set in global scope before inherit.
When it gets changed it also changes the EGIT_COMMIT correctly.

So when they do it in some function then need to change both variables themselves.
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2010-03-14 11:29:37 UTC
Just ignore the experimental useflag and do yourself a favor:

add to make.conf
uzbl_LIVE_BRANCH="name-of-the-branch-i-want"
and be done with it. This way it is on user to decide what branch he wants and no need to mess with ebuild :]
Comment 5 Paweł Tomak 2010-03-14 11:36:04 UTC
Ok, thanks :)
Now I understand

Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2010-03-14 11:37:55 UTC
reassigning to maintainer of uzbl
Comment 7 Alex Alexander (RETIRED) gentoo-dev 2010-03-14 14:38:33 UTC
fixed by changing both variables, thanks for reporting :)