software-properties-gtk crashed with apt_pkg.Error in init_apt_cache(): E:Incorrect entry in line 1 of the file

Bug #1968497 reported by Vladimir
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Ubuntu Jammy Jellyfish (development branch)
Release: 22.04

apt-cache policy software-properties-gtk
software-properties-gtk:
  Установлен: 0.99.22
  Кандидат: 0.99.22
  Таблица версий:
 *** 0.99.22 500
        500 http://mirror.docker.ru/ubuntu jammy/main amd64 Packages
        500 http://mirror.docker.ru/ubuntu jammy/main i386 Packages
        100 /var/lib/dpkg/status

software-properties-gtk crashed when there is incorrect apt record:

sudo software-properties-gtk
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 100, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 233, in __init__
    self.init_apt_cache()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 299, in init_apt_cache
    self.apt_cache = apt_pkg.Cache(None)
apt_pkg.Error: E:Incorrect entry in line 1 of the file «list» /etc/apt/sources.list.d/archive_uri-https_cernboxdistr_web_cern_ch_cernboxdistr_linux-jammy.list (Component), E:Failed to read the list of sources.

software-properties-gtk allowed to create this incorrect line but after that it crashed

Example of incorrect entry:
deb http://cernbox.cern.ch/cernbox/doc/Linux/repo.future/ Ubuntu_21.04

correct entry would be:
deb http://cernbox.cern.ch/cernbox/doc/Linux/repo.future/Ubuntu_21.04 /

only software-properties-gtk crashes, software-properties-qt does not.

ProblemType: Crash
DistroRelease: Ubuntu 22.04
Package: software-properties-gtk 0.99.22
ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
Uname: Linux 5.15.0-25-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu80
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sun Apr 10 21:43:19 2022
ExecutablePath: /usr/bin/software-properties-gtk
InstallationDate: Installed on 2022-03-25 (15 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220325)
InterpreterPath: /usr/bin/python3.10
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/software-properties-gtk
ProcEnviron:
 LANG=ru_RU.UTF-8
 TERM=xterm-256color
 PATH=(custom, no user)
 SHELL=/bin/bash
Python3Details: /usr/bin/python3.10, Python 3.10.4, python3-minimal, 3.10.4-0ubuntu2
PythonArgs: ['/usr/bin/software-properties-gtk']
PythonDetails: /usr/bin/python3.10, Python 3.10.4, python-is-python3, 3.9.2-2
SourcePackage: software-properties
Title: software-properties-gtk crashed with apt_pkg.Error in init_apt_cache(): E:Некорректная запись в строке 1 файла «list» /etc/apt/sources.list.d/archive_uri-https_cernboxdistr_web_cern_ch_cernboxdistr_linux-jammy.list (Component), E:Не удалось прочитать перечень источников.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A

Revision history for this message
Vladimir (javafors) wrote :
information type: Private → Public
summary: software-properties-gtk crashed with apt_pkg.Error in init_apt_cache():
- E:Некорректная запись в строке 1 файла «list»
- /etc/apt/sources.list.d/archive_uri-
- https_cernboxdistr_web_cern_ch_cernboxdistr_linux-jammy.list
- (Component), E:Не удалось прочитать перечень источников.
+ E:Incorrect entry in line 1 of the file
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
tags: removed: need-duplicate-check
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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