Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the existence of dconf-editor's schema #1447

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

City-busz
Copy link
Contributor

We need to check the existence of dconf-editor's GSettings schema before using it, because the program will abort if dconf-editor is not installed on the system when it tries to access it.

We need to check the existence of dconf-editor's GSettings schema before
using it, because the program will abort if dconf-editor is not installed
on the system when it tries to access it.
@cwendling
Copy link
Member

Not tested, but makes sense 👍

@cwendling cwendling requested a review from a team June 20, 2024 08:53
Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This builds and runs fine, and it does indeed let mate-panel run without dconf-editor installed. This removes a pesky unreported dependency, at least in Debian dconf-editor is NOT listed as a dependency but the panel without this change won't run without it.

The checking code is similar to what is used to look for the GNOME schemas read by wayland compositors in mate-control-center's appearance capplet and in wayland sessions load them if and only if present.

@lukefromdc lukefromdc requested a review from a team June 20, 2024 23:27
@lukefromdc
Copy link
Member

Anyone else want to review this before merging? This is a bugfix and in my opinion is another one worth cherrypicking to 1.28 and thankfully, this time around the issue this fixes didn't get introduced until 1.27 and never made it into 1.26

@lukefromdc
Copy link
Member

lukefromdc commented Jul 16, 2024

Any updates on this? This is something we really need to get done, as we have in 1.28 as it stands a new and unreported dependency on dconf-editor that could hand a lot of users an ugly surprise. Most won't know the reason their panel just keeps crashing is that they don't have dconf-editor installed.

It seems ready to go though we haven't gotten any reviews. Should I go ahead and merge this or not?

Copy link
Member

@thesquash thesquash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I was just about to fix this in my own PR when I saw this.

Sorry, I've been away for months due to terrible illness.

@thesquash thesquash merged commit 609d1ba into mate-desktop:master Oct 15, 2024
@lukefromdc
Copy link
Member

lukefromdc commented Oct 15, 2024

No problem, thanks for reviewing and merging when you could.

@lukefromdc
Copy link
Member

We have this Travis error that will probably block a new release of 1.28 carrying this fix from deploying. I do NOT know how to fix these Travis problems or know Ruby at all:

$ if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//// }); REPO_NAME=${REPO_SLUG_ARRAY[1]}; URL="https://${REPO_NAME}.mate-desktop.dev"; COMMENT="Code analysis completed"; curl -H "Authorization: token $GITHUB_TOKEN" -X POST -d "{"state": "success", "description": "$COMMENT", "context":"scan-build", "target_url": "$URL"}" https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA}; fi
dpl_0

$ rvm use $(travis_internal_ruby) --fuzzy do ruby -S gem uninstall -aIx dpl

/home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:112:in `block in taint': undefined method `taint' for an instance of String (NoMethodError)

          [key, self[key] && self[key].secret? ? value.taint : value]

                                                      ^^^^^^

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:111:in `each'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:111:in `map'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:111:in `taint'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:25:in `apply'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/cmd.rb:62:in `initialize'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/dpl-2.0.3.beta.4/lib/dpl/provider.rb:196:in `initialize'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/runner/default.rb:32:in `new'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/runner/default.rb:32:in `cmd'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/runner/default.rb:26:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl.rb:34:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/dpl-2.0.3.beta.4/lib/dpl/cli.rb:11:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/dpl-2.0.3.beta.4/bin/dpl:9:in `<top (required)>'

	from /home/travis/.rvm/gems/ruby-3.3.5/bin/dpl:25:in `load'

	from /home/travis/.rvm/gems/ruby-3.3.5/bin/dpl:25:in `<main>'

failed to deploy

lukefromdc pushed a commit that referenced this pull request Oct 15, 2024
We need to check the existence of dconf-editor's GSettings schema before
using it, because the program will abort if dconf-editor is not installed
on the system when it tries to access it.
@lukefromdc
Copy link
Member

Cherrypicked to 1.28

@lukefromdc
Copy link
Member

lukefromdc commented Oct 15, 2024

We need someone to fix the Travis issue blocking deployments or show me how to do it so I or someone else can release 1.28.3 so distros can pick this up. Until then, I would advise distrops to apply this patch especially if they don't want to ship dconf-editor or want to use an older version of it that uses the original interface

@lukefromdc
Copy link
Member

15de78f
Had no effect on this particular Travis problem, it had fixed a problem in another repo but didn't work here. The Debian build finishes fine, we deploy from Fedora which errored out on the part of the deployment which runs before determining whether to push a tarball to the releases page with this error again:


$ rvm use $(travis_internal_ruby) --fuzzy do ruby -S gem uninstall -aIx dpl

/home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:112:in `block in taint': undefined method `taint' for an instance of String (NoMethodError)

          [key, self[key] && self[key].secret? ? value.taint : value]

                                                      ^^^^^^

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:111:in `each'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:111:in `map'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:111:in `taint'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/opts.rb:25:in `apply'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/cmd.rb:62:in `initialize'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/dpl-2.0.3.beta.4/lib/dpl/provider.rb:196:in `initialize'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/runner/default.rb:32:in `new'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/runner/default.rb:32:in `cmd'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl/runner/default.rb:26:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/cl-1.2.4/lib/cl.rb:34:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/dpl-2.0.3.beta.4/lib/dpl/cli.rb:11:in `run'

	from /home/travis/.rvm/gems/ruby-3.3.5/gems/dpl-2.0.3.beta.4/bin/dpl:9:in `<top (required)>'

@correctmost
Copy link
Contributor

Here's an attempt to fix the Travis error: #1454

@lukefromdc
Copy link
Member

1.28.4 is out, ready for distros

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants