Page MenuHomePureOS Tracker

The repo edition app doesn't work
Open, NormalPublic

Description

 kekun@norfair  ~  uname -a
Linux norfair 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5 (2019-06-19) x86_64 GNU/Linux
 kekun@norfair  ~  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 PureOS/amber

By extension, this bug affects GNOME Software as it tries to run software-properties-gtk.

Event Timeline

adrien.plazas updated the task description. (Show Details)

Similarly:

 kekun@norfair  ~  sudo add-apt-repository https://ci.puri.sm/
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 95, in <module>
    sp = SoftwareProperties(options=options)
  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 PureOS/amber

I see similar behavior;

$ Linux sigmund 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64 GNU/Linux
$ software-properties-gtk
ERROR:root:Cannot import UbuntuDrivers: No module named 'UbuntuDrivers'

jeremiah.foster triaged this task as High priority.Sep 25 2019, 10:10

The workaround is to comment out the call to UbuntuDrivers python module in usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py
Line 61 to 65 starting with

try:                                                                                                                                                                                                                                                                 
    from UbuntuDrivers import detect

I can use add-apt-repository without issue, but I get other problems with the repo;

$ sudo add-apt-repository https://ci.puri.sm/
$ sudo apt update
Hit:1 https://repo.puri.sm/pureos amber InRelease                                                                       
Ign:2 https://ci.puri.sm amber InRelease                                                                                
Err:3 https://ci.puri.sm amber Release                                  
  404  Not Found [IP: 51.15.91.187 443]
Hit:4 https://repo.pureos.net/pureos amber-updates InRelease
Hit:5 https://repo.pureos.net/pureos amber-security InRelease
Reading package lists... Done
E: The repository 'https://ci.puri.sm a
```mber Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I got it to work by pulling down the ci-repo.key, and adding this line to sources.list; deb https://ci.puri.sm/ scratch librem5

On top of that we maybe could drop the dependency of gnome-software on software-properties-gtk, that would let GNOME Software use its own repo configuration dialog.

Is this perhaps a duplicate (and revisit) of T148 and/or T711? - symptoms seem similar.

Assigning to you, @jeremiah.foster as you seem to be involved already and know at least some bits of it...

jeremiah.foster lowered the priority of this task from High to Normal.Nov 1 2021, 07:50