View previous topic :: View next topic |
Author |
Message |
mani001 Guru
Joined: 04 Dec 2004 Posts: 485 Location: Oleiros
|
Posted: Mon Jan 22, 2018 8:44 pm Post subject: Error when setting up gnome-shell-extensions |
|
|
Hi,
I just installed gnome 3.24 and when I try
Code: | eselect gnome-shell-extensions list |
I get
Code: | !!! Error: Don't use eval. Find another way.
Call stack:
* eval (core.bash:124)
* gse_read_available (gnome-shell-extensions.eselect:116)
* do_list (gnome-shell-extensions.eselect:200)
* check_do (core.bash:24)
* do_action (core.bash:105)
* main (eselect:181)
exiting |
Anyone else hit by this? Probably not related, but I also have Plasma 5 installed (this was going to be a test run for gnome)
Cheers. |
|
Back to top |
|
|
n17r4m n00b
Joined: 22 Jan 2018 Posts: 23
|
Posted: Mon Jan 22, 2018 11:11 pm Post subject: |
|
|
Hey, not sure what the cause of this is (besides the use of "eval", allegedly), but I recall not getting this error when setting up my (systemd) gnome install about about a month ago, but trying again with latest updates yields the same error you are getting now.
The offending function in gnome-shell-extensions.eselect is:
( found in /usr/share/eselect/modules , note the eval near the bottom. )
Code: |
gse_read_available() {
local d
gse_prepare
# Do not expand * to '*' if $p is empty
shopt -s nullglob
for p in $(echo "${XDG_DATA_DIRS}" | tr -s ':' '\n'); do
pushd "${p}/gnome-shell/extensions" &> /dev/null || continue
for d in *; do
local full_d="${p}/gnome-shell/extensions/${d}"
# skip invalid extension directories
if ! [[ -d "${d}" && -f "${d}/metadata.json" && -s "${d}/metadata.json" ]]; then
warnings=( "${warnings[@]}" "${full_d} is not a valid extension" )
continue
fi
# earlier entries in XDG_DATA_DIRS take precedence
if has "${d}" "${available[@]}"; then
warnings=( "${warnings[@]}" "Skipping ${full_d}" )
continue
fi
available_dirs=( "${available_dirs[@]}" "${full_d}" )
available=( "${available[@]}" "${d}" )
done
popd > /dev/null
done
# Sort $available
if [[ -n "${available[@]}" ]]; then
eval available=( $(printf '%q\n' "${available[@]}" | sort ) )
fi
}
|
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21518
|
Posted: Tue Jan 23, 2018 3:10 am Post subject: |
|
|
This looks like two bugs in gnome-shell-extensions.eselect. The first is that it used eval at all. The second is that it was not caught in testing. A quick test here suggests that the eval is completely useless: Code: | $ a=( 3 1 2 )
$ b=( $(printf '%s\n' "${a[@]}" | sort) )
$ echo "${b[@]}"
1 2 3
|
|
|
Back to top |
|
|
PenumbralFromage n00b
Joined: 03 Feb 2018 Posts: 1
|
Posted: Sat Feb 03, 2018 2:41 am Post subject: |
|
|
Hu wrote: | This looks like two bugs in gnome-shell-extensions.eselect. The first is that it used eval at all. The second is that it was not caught in testing. A quick test here suggests that the eval is completely useless: Code: | $ a=( 3 1 2 )
$ b=( $(printf '%s\n' "${a[@]}" | sort) )
$ echo "${b[@]}"
1 2 3
|
|
Agreed - Also here:
Code: |
gse_write_config_file() {
local f="${ETCDIR}/${CONFIG_FILE}"
# Sort and uniquefy $enabled
eval enabled_saved=( $(printf '%q\n' "${enabled[@]}" | sort -u ) )
|
So, what's the process to get it fixed?
This nit is the last piece of my upgrade failing, and I'd love to push it aside without breaking the glass.
PF |
|
Back to top |
|
|
SoulDeaD n00b
Joined: 16 Jul 2010 Posts: 8
|
Posted: Thu Feb 15, 2018 9:53 am Post subject: |
|
|
That error is not fatal. You can use gnome-tweaks to enable your extensions. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21518
|
Posted: Fri Feb 16, 2018 2:22 am Post subject: |
|
|
PenumbralFromage wrote: | So, what's the process to get it fixed? | File a bug with the maintainer of the offending code. Explain that this code provokes the anti-eval check, and how to rewrite it to retain functionality while eliminating the use of eval. |
|
Back to top |
|
|
|