Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935016 - app-shells/bash-5.2_p26-r5: genfun_has_readline: command not found
Summary: app-shells/bash-5.2_p26-r5: genfun_has_readline: command not found
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-27 13:27 UTC by Andrey Grozin
Modified: 2024-06-27 16:45 UTC (History)
2 users (show)

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


Attachments
/var/lib/portage/config (config,3.10 KB, text/plain)
2024-06-27 14:17 UTC, Andrey Grozin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Grozin gentoo-dev 2024-06-27 13:27:01 UTC
After the upgrade from app-shells/bash-5.2_p26-r4 to -r5, ebery time I start bash (as myself or as root) I see

bash: genfun_has_readline: command not found

Colored prompts has disappeared. Indeed, the commit 	68c208ecd6b805ebc7796d2b71ceef4614179a2d has removed genfun_has_readline from ${FILES}/bashrc-r1 (the string genfun_has_readline does not appear anywhere in files/). From where does bash (after the upgrade) get this genfun_has_readline command which it wants to run??
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-27 13:28:18 UTC
Please run dispatch-conf. If that doesn't help, please show your ~/.bashrc.
Comment 2 Andrey Grozin gentoo-dev 2024-06-27 13:55:31 UTC
(In reply to Sam James from comment #1)
> Please run dispatch-conf. If that doesn't help, please show your ~/.bashrc.

root@bilbo ~ # dispatch-conf 
root@bilbo ~ #

grozin@bilbo ~ $ cat .bashrc
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.  So make sure this doesn't display
# anything or bad things will happen !


# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
        # Shell is non-interactive.  Be done now!
        return
fi


# Put your fun stuff here.
export LANG=ru_RU.utf8
export BROWSER=/opt/google/chrome/google-chrome
export ECHANGELOG_USER='Andrey Grozin <grozin@gentoo.org>'
export LESSCOLOR=yes
export LESSIGNORE="html htm"
export PATH=/home/grozin/bin:/home/grozin/reduce-6592/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/games/bin
function en() { grep -i $* /home/Books/dict/eng/*.utf8; }
alias f1='feh -FZ --on-last-slide hold'
alias x='pdflatex -synctex=1'
alias red='rlwrap /home/grozin/reduce-6592/bin/redpsl'
alias ll='ls -lF --color=auto'
alias la='ls -aF --color=auto'
function md () { mkdir -p "$1"; cd "$1"; }
alias rd='rmdir'
alias l='less'
alias qv='qpdfview'
grozin@bilbo ~ $
Comment 3 kfm 2024-06-27 14:11:14 UTC
To answer the question, the function used to come from /etc/bash/bashrc but was removed because it caused problems under two particular scenarios.

1) The user doesn't merge the new bashrc (or deliberately ignores updates to it)
2) The user sources bashrc.d drop-ins from ~/.bashrc

The second of those two scenarios came as a particular surprise. It turns out that  some people copy /etc/bash/bashrc to ~/.bashrc with only minor changes, even though they ought not to.

In the currently available releases, there is no co-dependency between bashrc and bashrc.d/10-gentoo-color.bash whatsoever, nor is genfun_has_readline declared or used.

Given that dispatch-conf doesn't propose any changes to you, it could be that you accidentally discarded one of the updates while using dispatch-conf or that there is some other issue with the confmem feature of portage. You could re-emerge bash with --noconfmem but, before you do, perhaps you could attach your /var/lib/portage/config file. It might help to explain what happened.
Comment 4 Andrey Grozin gentoo-dev 2024-06-27 14:17:23 UTC
Created attachment 896515 [details]
/var/lib/portage/config
Comment 5 kfm 2024-06-27 14:19:59 UTC
Thanks. I see that there is an entry for 10-gentoo-color.bash in your "config", which is probably why the update isn't being proposed to you. You can go ahead and re-emerge with --noconfmem. It should definitely show up in dispatch-conf afterwards.
Comment 6 Andrey Grozin gentoo-dev 2024-06-27 16:22:50 UTC
Solved.

My 10-gentoo-color.bash contains some customization (my terminals have bright white background, and bright green in the prompt looks not good; I changed it to dark green). Usually I merge changes made by the bash ebuild and my customizations (and do the same with DIR_COLORS, where I have rather numerous customizations), and then remove ._cfg0000_10-gentoo-color.bash. This time I somehow missed the change that eliminates the call to genfun_has_readline in 10-gentoo-color.bash.
Comment 7 kfm 2024-06-27 16:45:30 UTC
Though it is by no means required at this point, I would be interested in seeing your customisations. Knowing more about such a specialised use case could help to guide the decision making process in the future.