Summary: | app-shells/gentoo-bashcomp - /usr/share/bash-completion/gentoo fails when make.conf is in /etc/portage | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeroen Roovers (RETIRED) <jer> |
Component: | Current packages | Assignee: | Gentoo Shell Tools project <shell-tools> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 1i5t5.duncan, aranea, gentoo, rhill |
Priority: | Normal | Keywords: | InVCS, PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=434574 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | user-side (post-install) patch |
Description
Jeroen Roovers (RETIRED)
2012-07-04 15:15:06 UTC
Wouldn't this be a more future-proof fix? --- a/gentoo +++ b/gentoo @@ -21,12 +21,9 @@ _portdir() { ( - source /etc/make.globals 2>/dev/null - source /etc/make.conf 2>/dev/null - - echo ${PORTDIR} + echo $(portageq portdir) if [[ $1 == '-o' ]] ; then - echo ${PORTDIR_OVERLAY} + echo $(portageq portdir_overlay) fi ) } That would be both utterly canonically correct and terribly slow, especially when not caching the result. First checking for a "private" environment variable, say $_GENTOO_BASHCOMP_PORTDIR, and setting it if unset, would mitigate this problem, of course, but you would still be running it in every single shell. ( One other issue with the caching version would be that it should still (periodically?) check whether the cached location is still correct. ) Created attachment 323564 [details]
user-side (post-install) patch
This patch is based on the first one, but works better when applied (by normal users not prefix) after src_prepare or post-installation.
Here, I was able to simply drop it in /etc/portage/patches/app-shells/gentoo-baskcomp/ as make.conf.patch, and remerge. However, it doesn't appear the ebuild would trigger epatch_user on its own, so it's only applied by my local /etc/portage/bashrc hack that forces epatch_user in post_src_prepare, and thus simply dropping it in the appropriate place under /etc/portage/patches/ and remerging won't work for most people.
But it should be easier to apply to the live filesystem version post-install than the first one, too. Apply it either manually, or via the usual patch -pX from the appropriate subdir. The target file is /usr/share/bash-completion/gentoo.
Fixed in 20121024. |