Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931080 - app-shells/bash-5.2_p26-r3 broken 10-gentoo-color.bash
Summary: app-shells/bash-5.2_p26-r3 broken 10-gentoo-color.bash
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-02 07:15 UTC by Aweal
Modified: 2024-05-02 15:48 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 Aweal 2024-05-02 07:15:17 UTC
/etc/bash/bashrc.d/10-gentoo-color.bash has unknown  field : genfun_has_readline

37 if (( gentoo_color <= 0 )) || ! genfun_has_readline; then

this this results in a type error :
>> bash: genfun_has_readline: command not found

after login



Reproducible: Always




emerge --info https://bpa.st/ZGNQ

# grep genfun_has_readline /var/db/repos/gentoo/app-shells/bash/files/bashrc.d/10-gentoo-color.bash 
if (( gentoo_color <= 0 )) || ! genfun_has_readline; then
Comment 1 kfm 2024-05-02 12:28:25 UTC
The genfun_has_readline identifier refers to a function that is defined by /etc/bash/bashrc. Please check whether you have any unmerged config files. You can do this by running:

find /etc -name '._cfg*'

You may then find that there is a file named /etc/bash/._cfg0000_bashrc, or similarly named. In that case, you may use a tool such as dispatch-conf to merge it. See https://wiki.gentoo.org/wiki/Handbook:X86/Portage/Tools#dispatch-conf for more information.

If you find that the file in question does not exist, please run the following commands then add the resulting information to this bug, preferably as an attachment.

stat /etc/bash/bashrc
cat /var/lib/portage/config
Comment 2 kfm 2024-05-02 12:46:25 UTC
Just a small correction. If you find that the updated file is not present for merging, please obtain the information from the following three commands instead.

stat /etc/bash/bashrc
md5sum /etc/bash/bashrc
cat /var/lib/portage/config
Comment 3 Aweal 2024-05-02 12:55:41 UTC
i had skipped and delete this update (to many changes)...

add to bash.rc

< # A convenient function to determine whether bash has readline support.
< genfun_has_readline() [[ $(shopt -p direxpand 2>/dev/null) ]]
< 
< # The following two shell options require for bash to have readline support.
< genfun_has_readline &&

32c108,114

< unset -f genfun_has_readline
Comment 4 Aweal 2024-05-02 12:56:42 UTC
(In reply to kfm from comment #2)
> Just a small correction. If you find that the updated file is not present
> for merging, please obtain the information from the following three commands
> instead.
> 
> stat /etc/bash/bashrc
> md5sum /etc/bash/bashrc
> cat /var/lib/portage/config

thanks for the detailed explanation
Comment 5 kfm 2024-05-02 12:57:15 UTC
Alright. Closing as resolved then.
Comment 6 kfm 2024-05-02 12:58:25 UTC
By the way, if you accidentally reject an update, you can use the --noconfmem option of emerge to have it be proposed again.
Comment 7 Aweal 2024-05-02 15:48:59 UTC
(In reply to kfm from comment #6)
> By the way, if you accidentally reject an update, you can use the
> --noconfmem option of emerge to have it be proposed again.

thank you, valuable information