Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 507480 - dev-vcs/git-1.9.2: provide git-prompt.sh in a location the user can source
Summary: dev-vcs/git-1.9.2: provide git-prompt.sh in a location the user can source
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 509776 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-12 08:56 UTC by Lukas Hrazky
Modified: 2014-05-15 10:03 UTC (History)
5 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 Lukas Hrazky 2014-04-12 08:56:25 UTC
In (bug #477920), the git-prompt.sh was removed from bash-completion. That's fine, as it never belonged there.

But now the git-prompt.sh is provided at:
/usr/share/doc/git-1.9.2/git-prompt.sh.bz2

Which is wrong. First, it does not belong to a doc directory. Second, it is bzipped, forcing the user to unbzip it to a random location, with all the obvious disadvantages.

Please provide the script in an executable form on a proper path, so the user can source it conveniently without a copy.

Reproducible: Always
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-12 09:56:19 UTC
So what installation location would you suggest? I have no idea where a script which should be sourced instead of executed can be put into. I'd say the purpose of the script rules out /usr/bin/ as the installation locatin.
Comment 2 Lukas Hrazky 2014-04-12 10:23:10 UTC
I'm not that well versed in Gentoo's directory layout, but IMO:

Samuli Suominen suggested /usr/share/git/ in the bug #477920. I think it's a good location and don't have a better one. It matches with the /usr/share/bash-completion/completions location of the related, though different, bash-completion scripts.

So, either
/usr/share/git/git-prompt.sh

or something like
/usr/share/git/prompt/git-prompt.sh

?

I'd say a subdir is safer if the script gets split into separate files (highly improbable since it is sourced) or more related scripts are introduced (which I also consider improbable). I suppose I'd leave the subdir out myself.
Comment 3 Dyweni 2014-04-29 14:10:57 UTC
I second the idea of having '/usr/share/git/git-prompt.sh'...

Has any progress been made to resolve this yet?
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-29 14:16:48 UTC
I've scheduled this with the next git version bump unless robbat2 beats me on that ;)
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-05-07 10:39:34 UTC
*** Bug 509776 has been marked as a duplicate of this bug. ***
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-05-11 21:14:57 UTC
+*git-1.9.3 (11 May 2014)
+
+  11 May 2014; Lars Wendler <polynomial-c@gentoo.org> -git-1.8.4.4.ebuild,
+  -git-1.8.5.4.ebuild, -git-1.9.0.ebuild, -git-1.9.1.ebuild, +git-1.9.3.ebuild:
+  Version bump. Removed old. Fixed installation of git-prompt.sh file (bug
+  #507480).
+

The file can now be found in /usr/share/git/
Comment 7 Vincent de Phily 2014-05-15 09:07:59 UTC
Thanks for making the file available again. However:

* The einfo text is still incorrect, users will (like me) have a hard time figuring out what happened.
* 1.9.3 is still marked unstable, while the stable 1.8.5.5 still has the bug. Please either backport the fix to the 1.8.5.5 ebuild, or fix the einfo there, or stabilize 1.9.3.
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-05-15 10:03:57 UTC
+  15 May 2014; Lars Wendler <polynomial-c@gentoo.org> git-1.9.3.ebuild:
+  Fixed elog messages about git-prompt.sh script.
+

Thanks for letting me know about the wrong elog message. 
I won't backport this to stable git versions as that would require a revision bump and we would have to go through the whole stabilization process once again.
Feel free to install >=git-1.9.3 if you need the script so depserately in /usr/share/git/