Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error when setting up gnome-shell-extensions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mani001
Guru
Guru


Joined: 04 Dec 2004
Posts: 332
Location: Oleiros

PostPosted: Mon Jan 22, 2018 8:44 pm    Post subject: Error when setting up gnome-shell-extensions Reply with quote

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
View user's profile Send private message
n17r4m
n00b
n00b


Joined: 22 Jan 2018
Posts: 19

PostPosted: Mon Jan 22, 2018 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12735

PostPosted: Tue Jan 23, 2018 3:10 am    Post subject: Reply with quote

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
View user's profile Send private message
PenumbralFromage
n00b
n00b


Joined: 03 Feb 2018
Posts: 1

PostPosted: Sat Feb 03, 2018 2:41 am    Post subject: Reply with quote

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
View user's profile Send private message
SoulDeaD
n00b
n00b


Joined: 16 Jul 2010
Posts: 8

PostPosted: Thu Feb 15, 2018 9:53 am    Post subject: Reply with quote

That error is not fatal. You can use gnome-tweaks to enable your extensions.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12735

PostPosted: Fri Feb 16, 2018 2:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum