Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796341 - dev-vcs/git-flow-1.12.3-r1 crash with error /usr/bin/git-flow: line 83: /libexec/git-flow/gitflow-shFlags: No such file or directory
Summary: dev-vcs/git-flow-1.12.3-r1 crash with error /usr/bin/git-flow: line 83: /libe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-16 11:43 UTC by Jarosław Wójcik
Modified: 2021-06-16 13:21 UTC (History)
1 user (show)

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


Attachments
Output of the emerge --info (emerge--info.txt,5.84 KB, text/plain)
2021-06-16 11:43 UTC, Jarosław Wójcik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Wójcik 2021-06-16 11:43:57 UTC
Created attachment 716448 [details]
Output of the emerge --info

All git flow commands end with error:
/usr/bin/git-flow: line 83: /libexec/git-flow/gitflow-shFlags: No such file or directory

It is caused by an incorrect variable GITFLOW_DIR in a script /usr/bin/git-flow:
Line 44:
# Setup GITFLOW_DIR                                                                                                                 
GITFLOW_DIR="/libexec/git-flow"                                                                                                 
export GITFLOW_DIR

Line 82:
        # Use the shFlags project to parse the command line arguments
        . "$GITFLOW_DIR/gitflow-shFlags"
        FLAGS_PARENT="git flow"

The variable GITFLOW_DIR is set in a patch git-flow-1.12.3_scriptdir.patch:
+GITFLOW_DIR="@PREFIX@/libexec/git-flow"

The string @PREFIX@ is replaced in a file git-flow-1.12.3-r1.ebuild:
src_prepare() {
        default
        sed -i "s!doc/gitflow!doc/${PF}!" Makefile || die "Fixing doc path failed"
        sed -i "s!@PREFIX@!${EPREFIX}!" git-flow || die "Failed to set prefix in the script"
}

In my opinion if the variable EPREFIX has value '/usr', there won't be any error.

Workaround:
Update the line 45 to:
GITFLOW_DIR="/usr/libexec/git-flow"
Comment 1 Jarosław Wójcik 2021-06-16 11:56:08 UTC
Version dev-vcs/git-flow-1.12.3 works fine.
Comment 2 Marek Szuba archtester gentoo-dev 2021-06-16 13:20:28 UTC
D'oh, looks like I missed one 'git add' call before committing this ebuild. Thanks for the report, will be fixed shortly.
Comment 3 Larry the Git Cow gentoo-dev 2021-06-16 13:21:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=490357d3d77155d7f32da0b2332d162d1904a109

commit 490357d3d77155d7f32da0b2332d162d1904a109
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2021-06-16 13:20:41 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2021-06-16 13:21:33 +0000

    dev-vcs/git-flow: fix the script-directory prefix
    
    Closes: https://bugs.gentoo.org/796341
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 .../git-flow/{git-flow-1.12.3-r1.ebuild => git-flow-1.12.3-r2.ebuild}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)