diff -Nru software-properties-0.99.48/data/designer/dialog_editdeb822.ui software-properties-0.99.49/data/designer/dialog_editdeb822.ui
--- software-properties-0.99.48/data/designer/dialog_editdeb822.ui 1970-01-01 00:00:00.000000000 +0000
+++ software-properties-0.99.49/data/designer/dialog_editdeb822.ui 2024-04-22 18:48:04.000000000 +0000
@@ -0,0 +1,187 @@
+
+
+ dialog_edit
+
+
+
+ 0
+ 0
+ 382
+ 419
+
+
+
+ Edit Source
+
+
+ true
+
+
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
+ 9
+
+
+ 6
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600;">Suites:</span></p></body></html>
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Additional fields:
+
+
+
+ -
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ -
+
+
+ background-color: #FFFFFF;
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 6
+
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600;">Types:</span></p></body></html>
+
+
+
+ -
+
+
+ <b>Components:</b>
+
+
+
+ -
+
+
+ <html><head/><body><p><span style=" font-weight:600;">URIs:</span></p></body></html>
+
+
+
+ -
+
+
+ <b>Comment:</b>
+
+
+
+ -
+
+
+ Add
+
+
+
+ ..
+
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ dialog_edit
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ dialog_edit
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
diff -Nru software-properties-0.99.48/debian/changelog software-properties-0.99.49/debian/changelog
--- software-properties-0.99.48/debian/changelog 2024-04-18 07:17:51.000000000 +0000
+++ software-properties-0.99.49/debian/changelog 2024-04-22 19:22:26.000000000 +0000
@@ -1,3 +1,10 @@
+software-properties (0.99.49) noble; urgency=medium
+
+ * Add Qt frontend for deb822 sources, which is now the default in Noble
+ (LP: #2061214).
+
+ -- Simon Quigley Mon, 22 Apr 2024 14:22:26 -0500
+
software-properties (0.99.48) noble; urgency=medium
* Fix Python's warning of invalid escape sequence (LP: #2059412).
diff -Nru software-properties-0.99.48/software_properties.egg-info/PKG-INFO software-properties-0.99.49/software_properties.egg-info/PKG-INFO
--- software-properties-0.99.48/software_properties.egg-info/PKG-INFO 2023-03-22 15:52:01.000000000 +0000
+++ software-properties-0.99.49/software_properties.egg-info/PKG-INFO 1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-Metadata-Version: 2.1
-Name: software-properties
-Version: 0.96
-Requires: apt
-Requires: apt_pkg
-Requires: aptsources
-Requires: dbus
-Requires: distro_info
-Requires: gi
-Requires: gi.repository.GLib
-Requires: gi.repository.GObject
-Requires: gi.repository.Gdk
-Requires: gi.repository.GdkPixbuf
-Requires: gi.repository.Gio
-Requires: gi.repository.Gtk
-Requires: gi.repository.Handy
-Requires: gi.repository.PackageKitGlib
-Requires: launchpadlib.launchpad
-Provides: softwareproperties
-License-File: COPYING
-License-File: AUTHORS
diff -Nru software-properties-0.99.48/software_properties.egg-info/SOURCES.txt software-properties-0.99.49/software_properties.egg-info/SOURCES.txt
--- software-properties-0.99.48/software_properties.egg-info/SOURCES.txt 2023-03-22 15:52:01.000000000 +0000
+++ software-properties-0.99.49/software_properties.egg-info/SOURCES.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1,74 +0,0 @@
-AUTHORS
-COPYING
-README
-add-apt-repository
-setup.cfg
-setup.py
-software-properties-dbus
-software-properties-gtk
-software-properties-qt
-data/com.ubuntu.SoftwareProperties.conf
-data/com.ubuntu.SoftwareProperties.gschema.xml
-data/com.ubuntu.SoftwareProperties.service
-data/com.ubuntu.softwareproperties.policy.in
-data/software-properties-gtk.appdata.xml.in
-data/ubuntu-pro-logo-dark.svg
-data/ubuntu-pro-logo.svg
-data/designer/dialog_add.ui
-data/designer/dialog_edit.ui
-data/designer/dialog_mirror.ui
-data/designer/main.ui
-data/gtkbuilder/dialog-add-sources-list.ui
-data/gtkbuilder/dialog-add.ui
-data/gtkbuilder/dialog-cache-outofdate.ui
-data/gtkbuilder/dialog-cdrom-progress.ui
-data/gtkbuilder/dialog-edit-deb822-source.ui
-data/gtkbuilder/dialog-edit-source.ui
-data/gtkbuilder/dialog-mirror.ui
-data/gtkbuilder/dialog-ua-attach.ui
-data/gtkbuilder/dialog-ua-detach.ui
-data/gtkbuilder/dialog-ua-fips-enable.ui
-data/gtkbuilder/main.ui
-data/mime/apt.xml.in
-software_properties.egg-info/PKG-INFO
-software_properties.egg-info/SOURCES.txt
-software_properties.egg-info/dependency_links.txt
-software_properties.egg-info/top_level.txt
-softwareproperties/AptAuth.py
-softwareproperties/CountryInformation.py
-softwareproperties/MirrorTest.py
-softwareproperties/SoftwareProperties.py
-softwareproperties/__init__.py
-softwareproperties/cloudarchive.py
-softwareproperties/distro.py
-softwareproperties/ppa.py
-softwareproperties/shortcuthandler.py
-softwareproperties/shortcuts.py
-softwareproperties/sourceslist.py
-softwareproperties/sourceutils.py
-softwareproperties/uri.py
-softwareproperties/dbus/SoftwarePropertiesDBus.py
-softwareproperties/dbus/__init__.py
-softwareproperties/gtk/CdromProgress.py
-softwareproperties/gtk/DialogAdd.py
-softwareproperties/gtk/DialogAddSourcesList.py
-softwareproperties/gtk/DialogCacheOutdated.py
-softwareproperties/gtk/DialogEdit.py
-softwareproperties/gtk/DialogEditDeb822.py
-softwareproperties/gtk/DialogMirror.py
-softwareproperties/gtk/DialogUaAttach.py
-softwareproperties/gtk/DialogUaDetach.py
-softwareproperties/gtk/DialogUaFipsEnable.py
-softwareproperties/gtk/SimpleGtkbuilderApp.py
-softwareproperties/gtk/SoftwarePropertiesGtk.py
-softwareproperties/gtk/UbuntuProPage.py
-softwareproperties/gtk/__init__.py
-softwareproperties/gtk/dialogs.py
-softwareproperties/gtk/utils.py
-softwareproperties/qt/CdromProgress.py
-softwareproperties/qt/DialogAdd.py
-softwareproperties/qt/DialogEdit.py
-softwareproperties/qt/DialogMirror.py
-softwareproperties/qt/I18nHelper.py
-softwareproperties/qt/SoftwarePropertiesQt.py
-softwareproperties/qt/__init__.py
\ No newline at end of file
diff -Nru software-properties-0.99.48/software_properties.egg-info/dependency_links.txt software-properties-0.99.49/software_properties.egg-info/dependency_links.txt
--- software-properties-0.99.48/software_properties.egg-info/dependency_links.txt 2023-03-22 15:52:01.000000000 +0000
+++ software-properties-0.99.49/software_properties.egg-info/dependency_links.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-
diff -Nru software-properties-0.99.48/software_properties.egg-info/top_level.txt software-properties-0.99.49/software_properties.egg-info/top_level.txt
--- software-properties-0.99.48/software_properties.egg-info/top_level.txt 2023-03-22 15:52:01.000000000 +0000
+++ software-properties-0.99.49/software_properties.egg-info/top_level.txt 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-softwareproperties
diff -Nru software-properties-0.99.48/softwareproperties/qt/DialogEditDeb822.py software-properties-0.99.49/softwareproperties/qt/DialogEditDeb822.py
--- software-properties-0.99.48/softwareproperties/qt/DialogEditDeb822.py 1970-01-01 00:00:00.000000000 +0000
+++ software-properties-0.99.49/softwareproperties/qt/DialogEditDeb822.py 2024-04-22 19:12:55.000000000 +0000
@@ -0,0 +1,139 @@
+# Copyright (c) 2024 Simon Quigley
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+from PyQt5.QtWidgets import (QDialog, QLineEdit, QPushButton, QVBoxLayout, QHBoxLayout, QLabel, QGridLayout, QWidget)
+from PyQt5 import QtWidgets, uic
+from aptsources.sourceslist import Deb822SourceEntry
+
+class CustomSourceEntryField(QWidget):
+ def __init__(self, dialog, key=None, value=None):
+ super().__init__()
+
+ self.dialog = dialog
+ layout = QGridLayout(self)
+
+ self.entry_key = QLineEdit(self)
+ self.entry_key.setPlaceholderText("Key")
+ self.entry_val = QLineEdit(self)
+ self.entry_val.setPlaceholderText("Value")
+ self.button_delete = QPushButton("Delete", self)
+
+ if key is not None:
+ self.entry_key.setText(key)
+
+ if value is not None:
+ self.entry_val.setText(value)
+
+ self.entry_key.setCursorPosition(0)
+ self.entry_val.setCursorPosition(0)
+
+ layout.addWidget(self.entry_key, 0, 0)
+ layout.addWidget(self.entry_val, 0, 1)
+ layout.addWidget(self.button_delete, 0, 2)
+
+ self.button_delete.clicked.connect(self.delete_field)
+
+ def delete_field(self):
+ self.setParent(None)
+ self.deleteLater()
+ # You may need to handle resizing or additional cleanup here.
+
+ def get_key(self):
+ return self.entry_key.text()
+
+ def get_val(self):
+ return self.entry_val.text()
+
+
+class DialogEditDeb822(QDialog):
+ def __init__(self, parent, sourceslist, source_entry, datadir):
+ super().__init__(parent)
+
+ uic.loadUi("%s/designer/dialog_editdeb822.ui" % datadir, self)
+
+ self.sourceslist = sourceslist
+ self.source_entry = source_entry
+ self.new_source_entry = None
+ self.entry_types = self.findChild(QLineEdit, "entry_types")
+ self.entry_uris = self.findChild(QLineEdit, "entry_uris")
+ self.entry_suites = self.findChild(QLineEdit, "entry_suites")
+ self.entry_comps = self.findChild(QLineEdit, "entry_comps")
+ self.entry_comment = self.findChild(QLineEdit, "entry_comment")
+ self.button_add_field = self.findChild(QPushButton, "add_button")
+ self.button_box = self.findChild(QtWidgets.QDialogButtonBox, "buttonBox")
+
+ self.additional_fields_layout = self.findChild(QGridLayout, "additional_sources_layout")
+ self.populate_with_existing_source_entry()
+
+ self.button_add_field.clicked.connect(self.create_custom_source_entry)
+
+ def populate_with_existing_source_entry(self):
+ self.entry_types.setText(" ".join(self.source_entry.types))
+ self.entry_types.setCursorPosition(0)
+ self.entry_uris.setText(" ".join(self.source_entry.uris))
+ self.entry_uris.setCursorPosition(0)
+ self.entry_suites.setText(" ".join(self.source_entry.suites))
+ self.entry_suites.setCursorPosition(0)
+ self.entry_comps.setText(" ".join(self.source_entry.comps))
+ self.entry_comps.setCursorPosition(0)
+ self.entry_comment.setText(self.source_entry.comment.rstrip())
+ self.entry_comment.setCursorPosition(0)
+
+ for key, value in self.source_entry.section.tags.items():
+ if key not in ["Types", "URIs", "Suites", "Components"]:
+ self.append_custom_source_entry_field(key=key, value=value)
+
+ def append_custom_source_entry_field(self, key=None, value=None):
+ field = CustomSourceEntryField(self, key, value)
+ self.additional_fields_layout.addWidget(field)
+
+ def create_custom_source_entry(self):
+ self.append_custom_source_entry_field()
+
+ def get_custom_source_entry_fields(self):
+ return [self.additional_fields_layout.itemAt(i).widget() for i in range(self.additional_fields_layout.count())]
+
+ def is_current_input_valid(self):
+ if "" in (self.entry_types.text(), self.entry_uris.text(), self.entry_suites.text(), self.entry_comps.text()):
+ return False
+
+ for field in self.get_custom_source_entry_fields():
+ if "" in (field.get_key(), field.get_val()):
+ return False
+ return True
+
+ def source_entry_from_input(self):
+ source_entry = Deb822SourceEntry(None, self.source_entry.file)
+
+ source_entry.types = self.entry_types.text().split()
+ source_entry.uris = self.entry_uris.text().split()
+ source_entry.suites = self.entry_suites.text().split()
+ source_entry.comps = self.entry_comps.text().split()
+ source_entry.comment = self.entry_comment.text()
+
+ for field in self.get_custom_source_entry_fields():
+ source_entry.section[field.get_key()] = field.get_val()
+
+ return source_entry
+
+ def run(self):
+ res = self.exec_()
+ if res == QtWidgets.QDialog.Accepted:
+ self.new_source_entry = self.source_entry_from_input()
+
+ self.hide()
+ return res
diff -Nru software-properties-0.99.48/softwareproperties/qt/SoftwarePropertiesQt.py software-properties-0.99.49/softwareproperties/qt/SoftwarePropertiesQt.py
--- software-properties-0.99.48/softwareproperties/qt/SoftwarePropertiesQt.py 2024-03-28 14:20:40.000000000 +0000
+++ software-properties-0.99.49/softwareproperties/qt/SoftwarePropertiesQt.py 2024-04-22 18:59:03.000000000 +0000
@@ -45,8 +45,9 @@
import softwareproperties.SoftwareProperties
from .I18nHelper import *
-from aptsources.sourceslist import SourceEntry
+from aptsources.sourceslist import Deb822SourceEntry, SourceEntry
from .DialogEdit import DialogEdit
+from .DialogEditDeb822 import DialogEditDeb822
from .DialogAdd import DialogAdd
from .DialogMirror import DialogMirror
from .CdromProgress import CdromProgress
@@ -80,7 +81,8 @@
""" Provide a Qt-based graphical user interface to configure
the used software repositories, corresponding authentication keys
and update automation """
- SoftwareProperties.__init__(self, options=options, datadir=datadir)
+ SoftwareProperties.__init__(self, options=options, datadir=datadir,
+ deb822=True)
self.options = options
self.datadir = datadir
@@ -690,9 +692,14 @@
item = self.userinterface.treeview_sources.currentItem()
if item is not None:
index = self.userinterface.treeview_sources.indexOfTopLevelItem(item)
- dialogue = DialogEdit(self.userinterface, self.sourceslist, self.isv_sources[index], self.datadir)
+ if isinstance(self.isv_sources[index], Deb822SourceEntry):
+ dialogue = DialogEditDeb822(self.userinterface, self.sourceslist, self.isv_sources[index], self.datadir)
+ else:
+ dialogue = DialogEdit(self.userinterface, self.sourceslist, self.isv_sources[index], self.datadir)
result = dialogue.run()
if result == QDialog.Accepted:
+ self.replace_source_entry(str(self.isv_sources[index]),
+ str(dialogue.new_source_entry))
self.set_modified_sourceslist()
self.show_isv_sources()
diff -Nru software-properties-0.99.48/tests/aptroot/etc/apt/sources.list software-properties-0.99.49/tests/aptroot/etc/apt/sources.list
--- software-properties-0.99.48/tests/aptroot/etc/apt/sources.list 2023-03-22 15:52:03.000000000 +0000
+++ software-properties-0.99.49/tests/aptroot/etc/apt/sources.list 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-deb http://archive.ubuntu.com/ubuntu bionic main restricted # comment with unicode äöü