First, please either disable the use of ~-files in /etc/portage/repos.conf/ when eselect disables a repository _OR_ make [preferred-shell]-completion ignore those ~-files upon completing package-matchings. I'm having trouble with bash myself, but saw bug regarding zsh as well. Second, 'eselect repository disable [repo]' forgets to remove some newline(s) from /etc/portage/repos.conf/eselect-repo.conf making the file larger and larger with newlines as one enables and disables repositories. I suggest either removing empty newlines with the 'eselect repository disable'-command _OR_ simply handle each added/removed repository with their own files all together. Again both seems to have been suggested in past bugreports. BR /Charlie
Created attachment 762159 [details, diff] patch to ignore files ending in ~ in /etc/portage/repos.conf /usr/share/bash-completion/helpers/gentoo-common.sh is the script with the issue, here is one potential fix by adding && ${f} != *~ in with the [[ -f ${f} ]]
I think this is fixed by https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=f3f401b1166bb3d7f79b9f3cb8ebfc3527cd4394?
(In reply to Sam James from comment #2) > I think this is fixed by > https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/ > ?id=f3f401b1166bb3d7f79b9f3cb8ebfc3527cd4394? This is reverting the previous commit https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=7052f3bab2abeb620733fff21b2809429bacc554 (bug 562626). So, it might just be a better idea to disable backup files in eselect-repository after all.
(In reply to Sam James from comment #3) > (In reply to Sam James from comment #2) > > I think this is fixed by > > https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/ > > ?id=f3f401b1166bb3d7f79b9f3cb8ebfc3527cd4394? > > This is reverting the previous commit > https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/ > ?id=7052f3bab2abeb620733fff21b2809429bacc554 (bug 562626). Indeed (well, that plus a similar change in a different spot). From the git commit entry for the newer patch: >>> portage ignores any file in /etc/portage/repos.conf/ >>> (when that is in fact a directory) that does not >>> have a name of the form "*.conf". Except portage doesn't ignore non-*.conf files in repos.conf. Thus my bug # 562626 with the patch that is now reverted. And I know that hasn't changed as my repos.conf/* files still have no extension (just like the examples in the documentation, as I point out in the earlier bug), and portage definitely continues to see and use those repos. >>> gentoo-bashcomp should emulate the behavior of portage. Agreed. > So, it might just be a better idea to disable backup files in > eselect-repository after all. Can't disagree. =:^) Maybe have a different dir, repos.conf.disabled/ or repos.conf.bak/ or some such, instead of renaming files to disable-in-place? I do something similar with /etc/portage/patches/ files.