Merge lp:~sam-sgrs/software-properties/software-properties-fix-879943 into lp:software-properties

Proposed by Sam Segers
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 951
Merged at revision: 951
Proposed branch: lp:~sam-sgrs/software-properties/software-properties-fix-879943
Merge into: lp:software-properties
Diff against target: 29 lines (+9/-0)
2 files modified
softwareproperties/dbus/SoftwarePropertiesDBus.py (+6/-0)
softwareproperties/gtk/SoftwarePropertiesGtk.py (+3/-0)
To merge this branch: bzr merge lp:~sam-sgrs/software-properties/software-properties-fix-879943
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Review via email: mp+276345@code.launchpad.net

Description of the change

SoftwarePropertiesGtk launches the DBus backend. This backend keeps running between consecutive launches of the software properties.
The backend keeps the software lists in memory and only applies changes it gets from the GUI, so every change you make to the files in /etc/apt when the service is running are lost after you make a change in the GUI. It's even more confusing as the GUI does list the changes you made when you restart it, but the backend doesn't.

I've added a new dbus method to the backed that does a reload. It is triggered when the GUI launches.

I've pulled this change in the vivid package to test it locally.

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks good, approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwareproperties/dbus/SoftwarePropertiesDBus.py'
--- softwareproperties/dbus/SoftwarePropertiesDBus.py 2013-09-18 17:55:08 +0000
+++ softwareproperties/dbus/SoftwarePropertiesDBus.py 2015-11-01 12:52:55 +0000
@@ -105,6 +105,12 @@
105 sender, conn, "com.ubuntu.softwareproperties.applychanges")105 sender, conn, "com.ubuntu.softwareproperties.applychanges")
106 self.revert()106 self.revert()
107107
108 @dbus.service.method(DBUS_INTERFACE_NAME,
109 sender_keyword="sender", connection_keyword="conn",
110 in_signature='', out_signature='')
111 def Reload(self, sender=None, conn=None):
112 self.reload_sourceslist()
113
108 # Enabler/Disablers114 # Enabler/Disablers
109 @dbus.service.method(DBUS_INTERFACE_NAME,115 @dbus.service.method(DBUS_INTERFACE_NAME,
110 sender_keyword="sender", connection_keyword="conn",116 sender_keyword="sender", connection_keyword="conn",
111117
=== modified file 'softwareproperties/gtk/SoftwarePropertiesGtk.py'
--- softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-10-23 18:02:10 +0000
+++ softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-11-01 12:52:55 +0000
@@ -151,6 +151,9 @@
151 self.backend.connect_to_signal(151 self.backend.connect_to_signal(
152 "CdromScanFailed", self.on_cdrom_scan_failed)152 "CdromScanFailed", self.on_cdrom_scan_failed)
153153
154 # Reload dbus backend, for if there are any sources changed.
155 self.backend.Reload();
156
154 # Show what we have early157 # Show what we have early
155 self.window_main.show()158 self.window_main.show()
156159

Subscribers

People subscribed via source and target branches

to status/vote changes: