commit:     6e078f8a6e665f473bbf96668f13871e6119e0d8
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 31 08:30:55 2016 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Oct 31 08:30:55 2016 +0000
URL:        https://gitweb.gentoo.org/proj/eselect.git/commit/?id=6e078f8a

Disable eval again.

* libs/core.bash.in (eval): Disable eval again, because the
workaround for the rc module (sourcing functions.sh) is no longer
needed. See also 2005-05-15 change by ciaranm.

This partially reverts commit 76867bf1a47570cd9548100caed519252b5ced5a.

 ChangeLog         | 6 ++++++
 README            | 2 +-
 libs/core.bash.in | 6 ++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c7a54f6..80bc483 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-31  Ulrich Müller  <u...@gentoo.org>
+
+       * libs/core.bash.in (eval): Disable eval again, because the
+       workaround for the rc module (sourcing functions.sh) is no longer
+       needed. See also 2005-05-15 change by ciaranm.
+
 2016-10-30  Ulrich Müller  <u...@gentoo.org>
 
        * configure.ac: Update version to 1.4.7.

diff --git a/README b/README
index 945dc41..de19882 100644
--- a/README
+++ b/README
@@ -34,7 +34,7 @@ Style Notes
   one tab per indent level, with each tab representing 4 places.
 * Avoid lines wider than 79 positions.
 * Public functions don't get the ``es_`` prefix, private functions do.
-* eval is evil, so don't use it.
+* eval is evil, so we disabled it.
 * Absolute paths to executables are not portable, so don't use them.
 
 

diff --git a/libs/core.bash.in b/libs/core.bash.in
index baddfde..da35ee9 100644
--- a/libs/core.bash.in
+++ b/libs/core.bash.in
@@ -119,6 +119,12 @@ inherit() {
        done
 }
 
+# make eval not work, because it's evil
+eval() {
+       write_warning_msg "Don't use eval. Find another way."
+       builtin eval "$@"
+}
+
 # GNU sed wrapper (sed or gsed, as determined by configure)
 sed() {
        command @SED@ "$@"

Reply via email to