FS#52607 - [system-config-printer] libgnome-keyring should be required

Attached to Project: Arch Linux
Opened by Andreas Linz (klingt.net) - Tuesday, 17 January 2017, 23:29 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 18 February 2017, 21:09 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

The printer settings dialog from gnome-control-center can't be opened if system-config-printer is installed, unless one installs python2-gnomekeyring additionally.
Therefore, I would propose to add python2-gnomekeyring to system-config-printer's (optional) dependencies.

Additional info:
- system-config-printer 1.5.9-1
- cups 2.2.1-1
- gnome-shell 3.22.2+18+gdf7727a-1

Relevant log output when tried to start gnome's printer settings dialog:

```
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: Traceback (most recent call last):
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: File "/usr/share/system-config-printer/system-config-printer.py", line 84, in <module>
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: import jobviewer
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: File "/usr/share/system-config-printer/jobviewer.py", line 57, in <module>
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: gi.require_version('GnomeKeyring', '1.0')
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: File "/usr/lib/python3.6/site-packages/gi/__init__.py", line 118, in require_version
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: raise ValueError('Namespace %s not available' % namespace)
Jan 18 00:14:50 kn-elitebook system-config-printer.desktop[30027]: ValueError: Namespace GnomeKeyring not available
```

Steps to reproduce:

- install `system-config-printer` in gnome 3.22 and open printer settings from gnome-control-center
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Saturday, 18 February 2017, 21:09 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Wednesday, 18 January 2017, 03:34 GMT
Well that makes no sense at all. It's using python 3, why would it need a python 2 package?
Comment by AK (Andreaskem) - Wednesday, 18 January 2017, 06:20 GMT
I have no idea if it is related but, for some reason, gnome-keyring has "python" as a make dependency and libgnome-keyring has "python2" as a make dependency. The system-config-printer package has libgnome-keyring as an optional dependency.

edit:
Also, libgnome-keyring has
Last Updated: 2014-10-20 15:43 UTC (!)

Is this stuff even supposed to work anymore?
Comment by Jan de Groot (JGC) - Wednesday, 18 January 2017, 09:25 GMT
libgnome-keyring is deprecated and projects should use libsecret instead.

As for the dependency, the traceback shows that GnomeKeyring is imported through GI. libgnome-keyring contains the GnomeKeyring introspection files.
Comment by Paul Probert (electrogas) - Sunday, 22 January 2017, 03:20 GMT
This bug seems to be a simple error in catching the exception in python.
Looking at /usr/share/system-config-printer/jobviewer.py, I can fix the bug by editing at line 56:

try:
gi.require_version('GnomeKeyring', '1.0')
from gi.repository import GnomeKeyring
USE_KEYRING=True
except ImportError:
USE_KEYRING=False

Add the following two lines:

except ValueError:
USE_KEYRING=False

This makes it work fine, and also shows that the code was written to work without GnomeKeyring.
Comment by Andreas Radke (AndyRTR) - Friday, 27 January 2017, 07:23 GMT
Applying your workaround. See also https://github.com/zdohnal/system-config-printer/issues/51

1.5.9-2 in testing repo should work again.

Loading...