From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect:master commit in: /, libs/
Date: Tue, 14 Mar 2023 16:55:38 +0000 (UTC) [thread overview]
Message-ID: <1678812880.c7e76fc0b9add97eda8cf406cbd168a1997e9ae3.ulm@gentoo> (raw)
commit: c7e76fc0b9add97eda8cf406cbd168a1997e9ae3
Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 14 14:23:07 2023 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue Mar 14 16:54:40 2023 +0000
URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=c7e76fc0
Allow to specify modules by path
* libs/core.bash.in (find_module): Allow to specify an absolute
path as the module's filename.
Bug: https://bugs.gentoo.org/901205
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ChangeLog | 5 +++++
libs/core.bash.in | 11 ++++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index aab936d..57a53fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-14 Florian Schmaus <flow@gentoo.org>
+
+ * libs/core.bash.in (find_module): Allow to specify an absolute
+ path as the module's filename.
+
2023-02-28 Ulrich Müller <ulm@gentoo.org>
* bin/eselect.in: Disable colours if NO_COLOR is nonempty.
diff --git a/libs/core.bash.in b/libs/core.bash.in
index 740354e..2800cc5 100644
--- a/libs/core.bash.in
+++ b/libs/core.bash.in
@@ -1,5 +1,5 @@
# -*-eselect-*- vim: ft=eselect
-# Copyright (c) 2005-2020 Gentoo Authors
+# Copyright (c) 2005-2023 Gentoo Authors
#
# This file is part of the 'eselect' tools framework.
#
@@ -69,6 +69,15 @@ die() {
# Find module and echo its filename. Die if module doesn't exist.
find_module() {
local modname=$1 modpath
+
+ if [[ ${modname} == */* ]]; then
+ if [[ ${modname} == *.eselect && -f ${modname} ]]; then
+ echo "${modname}"
+ return
+ fi
+ die -q "Can't load module ${modname}"
+ fi
+
for modpath in "${ESELECT_MODULES_PATH[@]}"; do
if [[ -f ${modpath}/${modname}.eselect ]]; then
echo "${modpath}/${modname}.eselect"
next reply other threads:[~2023-03-14 16:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 16:55 Ulrich Müller [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-08-26 13:59 [gentoo-commits] proj/eselect:master commit in: /, libs/ Ulrich Müller
2019-02-13 20:51 Ulrich Müller
2018-01-23 12:52 Ulrich Müller
2016-11-01 6:29 Ulrich Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1678812880.c7e76fc0b9add97eda8cf406cbd168a1997e9ae3.ulm@gentoo \
--to=ulm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox