Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657736 - dev-vcs/stgit-0.18: stgit does not recognize its own version
Summary: dev-vcs/stgit-0.18: stgit does not recognize its own version
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-06-10 14:39 UTC by René 'Necoro' Neumann
Modified: 2018-10-26 14:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild Patch to write the version file (stgit-0.18.ebuild.diff,519 bytes, patch)
2018-06-10 14:44 UTC, René 'Necoro' Neumann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description René 'Necoro' Neumann 2018-06-10 14:39:02 UTC
For some unknown reason, stgit tries to detect its own version from git during build. This, of course, never worked and has been explicitly disabled in the ebuild:

	# this will be a noop, as we are working with a tarball,
	# but throws git errors --> just get rid of it
	sed -i -e 's/version\.write_builtin_version()//' setup.py || die

Unfortunately, the stgit-tarball (since 0.18?) does not include the required builtin_version.py anymore and hence reports 'unknown-version':

$ stg --version
Stacked GIT unknown-version

$ equery f stgit | grep egg
/usr/lib64/python2.7/site-packages/stgit-unknown_version-py2.7.egg-info

Proposals:
1.) Get upstream to fix this (cf https://github.com/ctmarinas/stgit/issues/25)
2.) Patch ebuild for the time being.
Comment 1 René 'Necoro' Neumann 2018-06-10 14:44:29 UTC
Created attachment 535548 [details, diff]
Ebuild Patch to write the version file

The patch above writes the builtin_version.py if it does not exist. Due to this check it should be future-proof, when upstream decides to create usefull tarballs.

After patching:
$ stg --version
Stacked GIT 0.18

$ equery f stgit | grep egg
/usr/lib64/python2.7/site-packages/stgit-0.18-py2.7.egg-info
Comment 2 Larry the Git Cow gentoo-dev 2018-10-26 14:58:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e187eee1a015ef61d6d261f9c30aa25541a0906

commit 0e187eee1a015ef61d6d261f9c30aa25541a0906
Author:     Yixun Lan <dlan@gentoo.org>
AuthorDate: 2018-10-26 14:36:46 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2018-10-26 14:58:32 +0000

    dev-vcs/stgit: fix show version err
    
    Closes: https://bugs.gentoo.org/657736
    Signed-off-by: Yixun Lan <dlan@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-vcs/stgit/stgit-0.18.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)