The officially official Devuan Forum!

You are not logged in.

#1 2018-06-19 05:20:48

Cosque
Member
Registered: 2018-06-15
Posts: 10  

I can not run software-properties-kde

Hello everyone, I try to run software-properties-kde and the following error messages appear, any ideas?

root@ZBook:/home/cosque# software-properties-kde
Traceback (most recent call last):
  File "/usr/bin/software-properties-kde", line 148, in <module>
    app = SoftwarePropertiesKDE(datadir=data_dir, options=options, file=afile, attachWinID=attachWinID)
  File "/usr/lib/python3/dist-packages/softwareproperties/kde/SoftwarePropertiesKDE.py", line 65, in __init__
    SoftwareProperties.__init__(self, options=options, datadir=datadir)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Devuan/ascii

Offline

#2 2018-06-19 08:18:10

cynwulf
Member
Registered: 2017-10-09
Posts: 234  

Re: I can not run software-properties-kde

That's not a good method of running a graphical programme.

Can you try the same again but run it with kdesu(1) and see if the same error occurs.

Offline

#3 2018-08-23 23:58:07

voomto
Member
Registered: 2017-10-06
Posts: 6  

Re: I can not run software-properties-kde

Hi cynwulf!

I have just detected the script /usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py is not really compatible with Devuan2, and prevents the user to access the repository settings from synaptic with the same error you have pointed:

user@devuan2:~$ synaptic-pkexec 
ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 101, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 109, in __init__
    SoftwareProperties.__init__(self, options=options, datadir=datadir)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Devuan/ascii

With no bug fix at the moment, the workaround is to remove the package python3-software-properties.

Hope this can help.

Offline

#4 2018-08-24 00:14:03

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: I can not run software-properties-kde

Those packages are available in all Devuan releases.

https://pkginfo.devuan.org/cgi-bin/d1pk … elease=any
https://pkginfo.devuan.org/cgi-bin/d1pk … elease=any

This error may be from a misconfigured sources.list.    Please check that it aligns with the options recommended here:
https://devuan.org/os/etc/apt/sources.list

Offline

#5 2018-08-25 07:46:16

voomto
Member
Registered: 2017-10-06
Posts: 6  

Re: I can not run software-properties-kde

Thanks golinux for your answer.

I have made many and many checks:
The problem remains the same whatever stands is /etc/apt/sources.list and /etc/apt/sources.list.d/*
I have looked at the python scripts, purged and reinstalled packages, checked system files ownerships and permissions, and watched strace log of synaptic failing to open the repository settings. Nothing found.

Finally, I have searched on the web and found very much similar errors (also in the synaptic debian bug archive), but no real solution.

Someone to "solve" this issue on Linux Mint gave a dirty hard code trick for a python script.

Someone on the ubuntu forum gave a better solution : simply add a file /usr/share/python-apt/templates/Devuan.info.

Can someone on this forum give a "corporate content" for /usr/share/python-apt/templates/Devuan.info?

To clarify, here is the bug I have first found that affect only some of my upgraded machines :
For unknown reason, synaptic fails to open the settings when python3-software-properties is installed on some of my upgraded devuan2 machines, but not on a freshly installed devuan2 from DVD.

Then I found that it concerns all the machines that have software-properties-gtk installed:
With that package, the error output within the terminal is the same, related to a missing file /usr/share/python-apt/templates/Devuan.info

So, everyone can reproduce that bug from a fresh installed devuan2 (mine just have virtualbox additions):

First install software-properties-gtk:

root@fresh_installed_devuan2:~# apt-get -y install software-properties-gtk

Then go crashing python module:

demo@fresh_installed_devuan2:~$ gksu software-properties-gtk
ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 101, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 109, in __init__
    SoftwareProperties.__init__(self, options=options, datadir=datadir)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Devuan/ascii
demo@fresh_installed_devuan2:~$ synaptic-pkexec 
ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 101, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 109, in __init__
    SoftwareProperties.__init__(self, options=options, datadir=datadir)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Devuan/ascii

I think this can be solved as easy as creating a good file /usr/share/python-apt/templates/Devuan.info (provided for instance by a postinst script of a package file depending on python-apt-common).

Last edited by voomto (2018-08-25 07:50:56)

Offline

#6 2018-08-25 13:03:32

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: I can not run software-properties-kde

The templates for the .info and .mirrors files are part of python-apt-common. Here are a couple of sample devuan files you can test. This is my best guess based on the existing files for debian, ubuntu, gnewsense and tanglu. I only included ascii. Both of these go in /usr/share/python-apt/templates/

Devuan.info

ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog

Suite: ascii
RepositoryType: deb
BaseURI: http://deb.devuan.org/merged
MatchURI: deb.devuan.org/merged
MirrorsFile: mirror_list.txt
Description: Devuan 2.0 'ascii'
Component: main
CompDescription: Officially supported
Component: contrib
CompDescription: DFSG-compatible Software with Non-Free Dependencies
Component: non-free
CompDescription: Non-DFSG-compatible Software

Suite: ascii-updates
RepositoryType: deb
ParentSuite: ascii
Description: Recommended updates

Suite: ascii-security
RepositoryType: deb
ParentSuite: ascii
Description: Security updates

Devuan.mirrors

#LOC:any
http://deb.devuan.org/merged

Offline

#7 2018-08-25 17:43:19

voomto
Member
Registered: 2017-10-06
Posts: 6  

Re: I can not run software-properties-kde

Thanks fsmithred,
The test pass with a not blocking error related to UbuntuDrivers, both with software-properties-gtk and synaptic-pkexec.

I put your fix in a script python-apt-common_template_fix.sh and run it:

#!/bin/sh
cat > /usr/share/python-apt/templates/Devuan.info << EOF
ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog

Suite: ascii
RepositoryType: deb
BaseURI: http://deb.devuan.org/merged
MatchURI: deb.devuan.org/merged
MirrorsFile: mirror_list.txt
Description: Devuan 2.0 'ascii'
Component: main
CompDescription: Officially supported
Component: contrib
CompDescription: DFSG-compatible Software with Non-Free Dependencies
Component: non-free
CompDescription: Non-DFSG-compatible Software

Suite: ascii-updates
RepositoryType: deb
ParentSuite: ascii
Description: Recommended updates

Suite: ascii-security
RepositoryType: deb
ParentSuite: ascii
Description: Security updates
EOF

cat > /usr/share/python-apt/templates/Devuan.mirrors << EOF
#LOC:any
http://deb.devuan.org/merged
EOF

Here are the terminal outputs:

demo@fresh_installed_devuan2:~$ gksu software-properties-gtk
ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'
WARNING: Failed to read mirror file

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:154:27: The style property GtkButton:image-spacing is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:155:26: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:584:27: The style property GtkButton:image-spacing is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:585:28: The style property GtkWidget:interior-focus is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:586:28: The style property GtkButton:default-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:587:26: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1344:25: The style property GtkRange:slider-width is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1345:25: The style property GtkRange:stepper-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1346:34: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1347:28: The style property GtkRange:stepper-spacing is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4999): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1348:34: The style property GtkRange:trough-under-steppers is deprecated and shouldn't be used anymore. It will be removed in a future version
demo@fresh_installed_devuan2:~$ synaptic-pkexec
ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'
WARNING: Failed to read mirror file

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:154:27: The style property GtkButton:image-spacing is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:155:26: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:584:27: The style property GtkButton:image-spacing is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:585:28: The style property GtkWidget:interior-focus is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:586:28: The style property GtkButton:default-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:587:26: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1344:25: The style property GtkRange:slider-width is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1345:25: The style property GtkRange:stepper-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1346:34: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1347:28: The style property GtkRange:stepper-spacing is deprecated and shouldn't be used anymore. It will be removed in a future version

(software-properties-gtk:4825): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1348:34: The style property GtkRange:trough-under-steppers is deprecated and shouldn't be used anymore. It will be removed in a future version

To remove the warning "Failed to read mirror file", I tried to add a trailing slash to http://deb.devuan.org/merged in Devuan.mirrors, as I believe trailing slashes for sources.list are mentioned in Debian specs. But the warning still remains.
Whatever, I think the bug is fixed! Thanks!

Offline

#8 2018-08-25 17:57:04

voomto
Member
Registered: 2017-10-06
Posts: 6  

Re: I can not run software-properties-kde

I have just found how to remove the the warning "Failed to read mirror file". In the file Devuan.info, simply replace "MirrorsFile: mirror_list.txt" with "MirrorsFile: Devuan.mirrors".

So my script python-apt-common_template_fix.sh should finally look like that:

#!/bin/sh
## Bug fix for Devuan2
## https://dev1galaxy.org/viewtopic.php?pid=11505

cat > /usr/share/python-apt/templates/Devuan.info << EOF
ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog

Suite: ascii
RepositoryType: deb
BaseURI: http://deb.devuan.org/merged
MatchURI: deb.devuan.org/merged
MirrorsFile: Devuan.mirrors
Description: Devuan 2.0 'ascii'
Component: main
CompDescription: Officially supported
Component: contrib
CompDescription: DFSG-compatible Software with Non-Free Dependencies
Component: non-free
CompDescription: Non-DFSG-compatible Software

Suite: ascii-updates
RepositoryType: deb
ParentSuite: ascii
Description: Recommended updates

Suite: ascii-security
RepositoryType: deb
ParentSuite: ascii
Description: Security updates
EOF

cat > /usr/share/python-apt/templates/Devuan.mirrors << EOF
#LOC:any
http://deb.devuan.org/merged
EOF

Offline

#9 2018-08-25 21:06:44

voomto
Member
Registered: 2017-10-06
Posts: 6  

Re: I can not run software-properties-kde

I discovered the bug concerns Devuan 1 too.

So I suggest this updated script to fix it :

#!/bin/sh
## Bug fix for Devuan1 and Devuan2
## https://dev1galaxy.org/viewtopic.php?pid=11505

if test "$USER" != "root"; then
  echo "This is a bug fix for Devuan1 and Devuan2."
  echo "See: https://dev1galaxy.org/viewtopic.php?pid=11505"
  echo "root user required!"
  exit 1
fi

test -d /usr/share/python-apt/templates || mkdir -pm 755 /usr/share/python-apt/templates

cat > /usr/share/python-apt/templates/Devuan.info << EOF
ChangelogURI: http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog

Suite: jessie
RepositoryType: deb
BaseURI: http://deb.devuan.org/merged
MatchURI: deb.devuan.org/merged
MirrorsFile: Devuan.mirrors
Description: Devuan 1.0 'jessie'
Component: main
CompDescription: Officially supported
Component: contrib
CompDescription: DFSG-compatible Software with Non-Free Dependencies
Component: non-free
CompDescription: Non-DFSG-compatible Software

Suite: jessie-updates
RepositoryType: deb
ParentSuite: jessie
Description: Recommended updates

Suite: jessie-security
RepositoryType: deb
ParentSuite: jessie
Description: Security updates

Suite: ascii
RepositoryType: deb
BaseURI: http://deb.devuan.org/merged
MatchURI: deb.devuan.org/merged
MirrorsFile: Devuan.mirrors
Description: Devuan 2.0 'ascii'
Component: main
CompDescription: Officially supported
Component: contrib
CompDescription: DFSG-compatible Software with Non-Free Dependencies
Component: non-free
CompDescription: Non-DFSG-compatible Software

Suite: ascii-updates
RepositoryType: deb
ParentSuite: ascii
Description: Recommended updates

Suite: ascii-security
RepositoryType: deb
ParentSuite: ascii
Description: Security updates
EOF

cat > /usr/share/python-apt/templates/Devuan.mirrors << EOF
#LOC:any
http://deb.devuan.org/merged
EOF

echo "Bug fix is done."

Offline

Board footer