Software & Updates doesn't handle sources files properly when an entry has options

Bug #1986513 reported by Paddy Landau
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

— SYNOPSIS —

Software & Updates (software-properties-gtk) has a tab "Other Software" that lists all entries in /etc/apt/sources.list and in /etc/apt/sources.list.d/*.list

Some entries have an option in square brackets, e.g.:

deb [arch=amd64] ...

But, Software & Updates doesn't handle these options properly.

1. It removes the option if you edit the entry.
2. If the option contains "signed-by", Software & Updates doesn't even list the entry, and thus allows you to add a duplicate entry (normally prevented).

— EXAMPLES —

Example of point 1:

Consider Google Chrome:
deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main #Chrome

If you edit this entry in Software & Updates, it removes [arch=amd64].

The same applies to [trusted=yes].

Example of point 2:

Consider SpiderOakONE, which needs "signed-by".
deb [signed-by=/usr/share/keyrings/spideroakone.gpg] https://apt.spideroak.com/ubuntu/ release restricted #SpiderOakONE

This also happens with combinations:
deb [arch=amd64 signed-by=/usr/share/keyrings/spideroakone.gpg] https://apt.spideroak.com/ubuntu/ release restricted #SpiderOakONE

Software & Updates doesn't even display this entry. Thus, you can manually re-add this deb, albeit without the signed-by option.

— MORE DETAIL —

Confusingly, you can add the option [arch=amd64] or [trusted=yes] (or both) when you add an entry in Software & Updates, but if you then edit the entry, Software & Updates removes the option.

— EXPECTED BEHAVIOUR —

Software & Updates should:

• Display all entries
• Preserve all options when editing an entry
• Allow you to add suitable options when adding an entry
• Allow you to edit options when editing an entry

— VERSIONS —

Ubuntu version:
Tested on Ubuntu 20.04.4 and Ubuntu 22.04.1

software-properties-gtk version:
0.99.9.8 (on Ubuntu 20.04)
0.99.22.3 (on Ubuntu 22.04)

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: software-properties-gtk 0.99.22.3
ProcVersionSignature: Ubuntu 5.15.0-46.49-generic 5.15.39
Uname: Linux 5.15.0-46-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Aug 15 09:19:51 2022
ExecutablePath: /usr/bin/software-properties-gtk
InstallationDate: Installed on 2022-05-05 (101 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
InterpreterPath: /usr/bin/python3.10
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
Python3Details: /usr/bin/python3.10, Python 3.10.4, python3-minimal, 3.10.4-0ubuntu2
PythonDetails: N/A
SourcePackage: software-properties
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Paddy Landau (paddy-landau) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
Revision history for this message
Julian Alarcon (julian-alarcon) wrote :
Revision history for this message
James C. (jfw01) wrote :

Same implementation (limitations in /usr/lib/python3/dist-packages/softwareproperties/sourceslist.py and failure of its users to understand it) as
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1864280
which already has an importance.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.