Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538938 - dev-vcs/git-flow-1.8.0 errors during release, probably due to unbundled dev-util/shflags-1.0.3
Summary: dev-vcs/git-flow-1.8.0 errors during release, probably due to unbundled dev-u...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Johannes Huber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-05 15:13 UTC by Tiziano Müller (RETIRED)
Modified: 2015-08-15 22:11 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 Tiziano Müller (RETIRED) gentoo-dev 2015-02-05 15:13:56 UTC
When doing a `git flow release` I get the following:

$ git flow release finish '0.1.0'
/usr/share/misc/shflags: line 315: FLAGS_squash-info=1: command not found
/usr/share/misc/shflags: line 316: __flags_squash-info_type=1: command not found
/usr/share/misc/shflags: line 318: __flags_squash-info_default=1: command not found
/usr/share/misc/shflags: line 319: __flags_squash-info_help=add branch info during squash: command not found
/usr/share/misc/shflags: line 320: __flags_squash-info_short=~: command not found
/usr/share/misc/shflags: line 362: [: info_type:-: integer expression expected
/usr/share/misc/shflags: line 370: [: info_type:-: integer expression expected
Switched to branch 'master'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'develop'
Already up-to-date!
Merge made by the 'recursive' strategy.
Deleted branch release/0.1.0 (was dbaaf2c).

Summary of actions:
- Release branch 'release/0.1.0' has been merged into 'master'
- The release was tagged 'v0.1.0'
- Release tag 'v0.1.0' has been back-merged into 'develop'
- Release branch 'release/0.1.0' has been locally deleted
- You are now on branch 'develop'

Comparing the bundled gitflow-shFlags with shFlags from 1.0.3 shows considerable difference:

$ diff -Naurb /usr/share/misc/shflags gitflow-shFlags | diffstat
 gitflow-shFlags |  494 ++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 353 insertions(+), 141 deletions(-)

and I'd therefore consider it to be the culprit.
Comment 1 Tiziano Müller (RETIRED) gentoo-dev 2015-02-26 16:38:34 UTC
by updating shflags to 1.0.4_pre191 (svn checkout of revision 191) the warnings/errors are gone.
Comment 2 Jelte Fennema 2015-05-10 09:02:57 UTC
What would be the good way to fix this? I don't mind doing the work of supplying patches, but what should be changed, should there be an ebuild for the svn checkout or should the bundled shflags be used?
Comment 3 Jelte Fennema 2015-05-10 09:03:56 UTC
Another fix is to use my patch supplied here: 
https://github.com/petervanderdoes/gitflow/pull/200
Comment 4 Florian Gamböck 2015-05-13 17:44:14 UTC
I suggest we use the shFlags.sh which comes with gitflow. The gitflow authors made changes there which may or may not make it into the upstream shFlags.

Since it is just a single file it does not hurt that much.
Comment 5 Florian Gamböck 2015-06-13 11:56:29 UTC
So, to move this issue forward, it basically comes down to:

diff --git a/git-flow-1.8.0.ebuild b/git-flow-1.8.0-r1.ebuild
--- a/git-flow-1.8.0.ebuild
+++ b/git-flow-1.8.0-r1.ebuild
@@ -22,22 +22,13 @@ IUSE=""
 
 DEPEND=""
 RDEPEND="${DEPEND}
-	dev-util/shflags
 	dev-vcs/git
 "
 
 DOCS=( AUTHORS Changes.mdown README.mdown )
 
-PATCHES=( "${FILESDIR}/${P}-unbundle-shflags.patch" )
-
 S="${WORKDIR}/${MY_PN}-${PV}"
 
-src_prepare() {
-	[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
-	debug-print "$FUNCNAME: applying user patches"
-	epatch_user
-}
-
 src_compile() {
 	true
 }
Comment 6 Johannes Huber (RETIRED) gentoo-dev 2015-06-18 13:01:23 UTC
The correct approach is to fix shflags package, instead of re-bundling the lib.
Comment 7 Florian Gamböck 2015-06-30 21:18:07 UTC
Hi Johannes,

I am not quite sure what you mean by "fix shflags package". The gitflow authors made changes to shflags and created their own variation of it to fit the needs of their software. That's why they ship out shflags with gitflow in the first place. Those changes are not even in the current upstream shflags on github.

How are we supposed to "fix" such a scenario?
Comment 8 Johannes Huber (RETIRED) gentoo-dev 2015-06-30 21:23:46 UTC
(In reply to Florian Gamböck from comment #7)
> How are we supposed to "fix" such a scenario?

Send patches to shflags upstream, get a release.
Comment 9 Florian Gamböck 2015-06-30 21:59:12 UTC
I could at least tell the gitflow authors to send their patches, since I am not comfortable with sending in patches I didn't even create.

But the point I am trying to explain is, those changes were specifically made for gitflow. We don't even know if those patches will be ever accepted by upstream shflags or if they are even wanted.

So I wonder if this is really worth the trouble, given that we are talking about a 40KB bash script. Please don't misunderstand me, usually I would totally agree with you if it's some kind of big library. But given the small size, it won't hurt to just take the modified version that is bundled with gitflow. Even the bash_completion script of git is bigger, by the way.
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2015-08-10 08:53:03 UTC
Johannes,

could you please readd the bundled files until shflags are compatible again? Having a broken package is worse than having some files bundled.

Thanks.