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

Guake 3.6.3 missing gschemas.compiled in PyPi #1621

Closed
y2kbadbug opened this issue Jun 30, 2019 · 12 comments · Fixed by #1893
Closed

Guake 3.6.3 missing gschemas.compiled in PyPi #1621

y2kbadbug opened this issue Jun 30, 2019 · 12 comments · Fixed by #1893

Comments

@y2kbadbug
Copy link

I am the maintainer of the FreeBSD port for Guake. We usually use PyPi for Python projects in ports, except in extreme situations. In trying to update the port from 3.4.0 to 3.6.3, I am at a blocker due to gschemas.compiled missing from the PyPi version.

Was there a reason behind removing this? If so, any recommendations past this issue?

Thanks!

@koobs
Copy link

koobs commented Jun 30, 2019

Python packages should be pip installable'd by users using the PyPI distributed wheel's and sdists, so we should find a way to have the appropriate files processed pre/during PyPI updates on release

@gsemet
Copy link
Member

gsemet commented Jul 9, 2019

Actually, the compiled version is done automatically upon guake starts (there is an ugly call to the compiler in the init function of guake). I do not know if we can safely distribute the gschemas.compiled file, for any env that there will be out there

@koobs
Copy link

koobs commented Jul 10, 2019

@gsemet Thanks for the followup :)

If the schemas are environment/system specific, it would be great instead then to have this happen as part of the 'build' in a setup.py BuildSchemas() class or similar, rather than at start time.

This will be ensure that all files produced by the package end up in setuptools/pip --record output, making packaging for downstream OS's much easier (zero effort) and making package deinstallation and upgrades clean without leaving orphaned files behind.

@gsemet
Copy link
Member

gsemet commented Jul 10, 2019

Not sure if it is the right thing to do. What if I have Gnome n on my machine where setup.py Will be executed and your version is different. I do not know if this will work.

@sphh
Copy link

sphh commented Mar 25, 2020

This is still not working in 3.7.0.

I did a fresh system wide installation with

sudo pip3 install guake

When I start guake as user, I get the following error. Is this, because the user does not have write access to the system-wide installation? For me compiling during installation makes a lot of sense …

Guake not running, starting it
Loading Gnome schema from: /usr/local/lib/python3.6/dist-packages/guake/data
Unable to load the GLib schema, try to compile it
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
's', (bus_name,), **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/guake/main.py", line 452, in main
remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in init
self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/guake/guake_app.py", line 128, in init
schema_source = load_schema()
  File "/usr/local/lib/python3.6/dist-packages/guake/guake_app.py", line 124, in load_schema
SCHEMA_DIR, Gio.SettingsSchemaSource.get_default(), False
GLib.GError: g-file-error-quark: Failed to open file/usr/local/lib/python3.6/dist-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)
Compiling schema: /usr/local/lib/python3.6/dist-packages/guake/data
Failed to create file/usr/local/lib/python3.6/dist-packages/guake/data/gschemas.compiled.MTNPH0”: Permission denied
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
's', (bus_name,), **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/guake/guake_app.py", line 128, in init
schema_source = load_schema()
  File "/usr/local/lib/python3.6/dist-packages/guake/guake_app.py", line 124, in load_schema
SCHEMA_DIR, Gio.SettingsSchemaSource.get_default(), False
GLib.Error: g-file-error-quark: Failed to open file/usr/local/lib/python3.6/dist-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/guake", line 8, in <module>
sys.exit(exec_main())
  File "/usr/local/lib/python3.6/dist-packages/guake/main.py", line 614, in exec_main
if not main():
  File "/usr/local/lib/python3.6/dist-packages/guake/main.py", line 467, in main
instance = Guake()
  File "/usr/local/lib/python3.6/dist-packages/guake/guake_app.py", line 131, in init
try_to_compile_glib_schemas()
  File "/usr/local/lib/python3.6/dist-packages/guake/paths.py", line 99, in try_to_compile_glib_schemas
subprocess.check_call(["glib-compile-schemas", "--strict", SCHEMA_DIR])
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['glib-compile-schemas', '--strict', '/usr/local/lib/python3.6/dist-packages/guake/data']' returned non-zero exit status 1.

@sphh
Copy link

sphh commented Mar 25, 2020

The workaround in my case is:

sudo glib-compile-schemas /usr/local/lib/python3.6/dist-packages/guake/data/

@y2kbadbug
Copy link
Author

@sphh, this is kind of why I abandoned the update for a while in the FreeBSD ports tree. I could not find a way around this, and I spent at least 100+ hours working on this single issue.

It has been almost 2 years since this issue was opened, and over a year since 3.7.0. Sadly, until this is fixed or I am provided a solution Guake in FreeBSD will not be updated.

@sphh
Copy link

sphh commented Mar 20, 2021

Well, I deleted Guake, because of too many outstanding bugs and (what looked at that time) abandonment of the authors. I found Tilix which can do more(?) than what Guake can do …

@gsemet
Copy link
Member

gsemet commented Mar 20, 2021

Sorry guy I loved on in my life but I still welcome contributors if they fixes issues !!

@Davidy22
Copy link
Collaborator

Putting togethor a patch to fix a related issue #1718, which might also fix this. Will update when I make the pull request.

@eli-schwartz
Copy link
Collaborator

We usually use PyPi for Python projects in ports, except in extreme situations.

How do you handle installing the .desktop file, for example?

@Davidy22
Copy link
Collaborator

I've opened a pull request with a potential fix. From the pull request's branch, you can run make wheel to create a wheel file in a /dist directory, then pip install the wheel. If this resolves/doesn't resolve the problem, confirmation in the open pull request or here would be appreciated.

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

Successfully merging a pull request may close this issue.

6 participants