diff options
author | redneb <redneb@gmx.com> | 2021-11-16 17:42:15 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2021-11-16 17:08:23 +0100 |
commit | f3f401b1166bb3d7f79b9f3cb8ebfc3527cd4394 (patch) | |
tree | ebd23ec17ff7c00d40154ac70109e402dc80744f | |
parent | fix repos.conf files pattern matching. (diff) | |
download | gentoo-bashcomp-f3f401b1166bb3d7f79b9f3cb8ebfc3527cd4394.tar.gz gentoo-bashcomp-f3f401b1166bb3d7f79b9f3cb8ebfc3527cd4394.tar.bz2 gentoo-bashcomp-f3f401b1166bb3d7f79b9f3cb8ebfc3527cd4394.zip |
ignore non conf files in /etc/portage/repos.conf.
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".
gentoo-bashcomp should emulate the behavior of portage. Otherwise you
might run into issues: e.g. if there is a backup of eselect-repo.conf
called eselect-repo.conf~ that contains references to a now removed
overlay, gentoo-bashcomp should not try to search for completions in the
now nonexistent repo directory
Closes: https://github.com/gentoo/gentoo-bashcomp/pull/5
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
-rw-r--r-- | helpers/gentoo-common.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helpers/gentoo-common.sh b/helpers/gentoo-common.sh index 6e8d51c..9424ad6 100644 --- a/helpers/gentoo-common.sh +++ b/helpers/gentoo-common.sh @@ -7,7 +7,7 @@ # Retrieve PORTDIR/PORTDIR_OVERLAY location. # # In order of highest to lowest priority: -# /etc/portage/repos.conf{,/*} +# /etc/portage/repos.conf{,/*.conf} # /usr/share/portage/config/repos.conf # /etc/portage/make.conf # /etc/make.conf @@ -65,7 +65,7 @@ _parsereposconf() { for f in @GENTOO_PORTAGE_EPREFIX@/usr/share/portage/config/repos.conf \ @GENTOO_PORTAGE_EPREFIX@/etc/portage/repos.conf \ - @GENTOO_PORTAGE_EPREFIX@/etc/portage/repos.conf/*; do + @GENTOO_PORTAGE_EPREFIX@/etc/portage/repos.conf/*.conf; do [[ -f ${f} ]] || continue insection=0 |