Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722304 - bash completion outputs annoying messages after disabling an overlay
Summary: bash completion outputs annoying messages after disabling an overlay
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-11 03:36 UTC by Zhichu Chen
Modified: 2022-08-22 21: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 Zhichu Chen 2020-05-11 03:36:15 UTC
I used "eselect repository enable xxx" to enable the "xxx" (the repo name is trivial, I think) repo. And I changed my mind and use "eselect repository disable xxx" to remove it.

This seems to be consistent but an extra "eselect-repo.conf~" backup file is created by the "eselect" program or whoever it might be.

This is almost harmless but "_portdir -o" will output the "xxx" repo due to the backup file.

Therefore, bash completion will tell you that it cannot find the "xxx" related directory.

I really don't know which program should be responsible.
bash-completion for involking _portdir rather than implementing it by itself?
eselect for making the pointless (or is it?) backup?
_portdir for not ignoring the backup file?

So please change the category for me. Thanks in advance.
Comment 1 Jonas Stein gentoo-dev 2020-05-14 00:16:45 UTC
I do not understand this ticket please get support on [1-4] and reopen the ticket if you found out which package is broken.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/
Comment 2 Greg Kubaryk 2020-05-25 02:13:41 UTC
it's debatable which package is broken, but I'll submit the following facts:
app-shells/bash-completion-2.10::gentoo defines _parsereposconf which contains this line:
for f in /usr/share/portage/config/repos.conf /etc/portage/repos.conf /etc/portage/repos.conf/*;

and app-eselect/eselect-repository-7::gentoo creates /etc/portage/repos.conf/eselect-repo.conf~ when 'eselect repository remove reponame' is run.

/etc/portage/repos.conf/* includes /etc/portage/repos.conf/eselect-repo.conf~ which now contains a reference to a removed repository, which spits sadness to the screen, as described in the original report.

is it a bug in bash-completion for being too loose in what kinds of files it looks at? is there a definition of what file names are eligible to be read from repos.conf? is it a bug in eselect-repository or one of its friends that the backup gets made at all? hopefully someone can re-examine the report.

trivially reproduced, nothing specific to this repo, just used for example:
1) eselect repository enable guru
2) eselect repository disable guru
3) emerge -pvO [tab]

actual results: bash: cd: /var/db/repos/guru: No such file or directory

workaround: rm /etc/portage/repos.conf/eselect-repo.conf~