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
1=== modified file 'softwareproperties/dbus/SoftwarePropertiesDBus.py'
2--- softwareproperties/dbus/SoftwarePropertiesDBus.py 2013-09-18 17:55:08 +0000
3+++ softwareproperties/dbus/SoftwarePropertiesDBus.py 2015-11-01 12:52:55 +0000
4@@ -105,6 +105,12 @@
5 sender, conn, "com.ubuntu.softwareproperties.applychanges")
6 self.revert()
7
8+ @dbus.service.method(DBUS_INTERFACE_NAME,
9+ sender_keyword="sender", connection_keyword="conn",
10+ in_signature='', out_signature='')
11+ def Reload(self, sender=None, conn=None):
12+ self.reload_sourceslist()
13+
14 # Enabler/Disablers
15 @dbus.service.method(DBUS_INTERFACE_NAME,
16 sender_keyword="sender", connection_keyword="conn",
17
18=== modified file 'softwareproperties/gtk/SoftwarePropertiesGtk.py'
19--- softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-10-23 18:02:10 +0000
20+++ softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-11-01 12:52:55 +0000
21@@ -151,6 +151,9 @@
22 self.backend.connect_to_signal(
23 "CdromScanFailed", self.on_cdrom_scan_failed)
24
25+ # Reload dbus backend, for if there are any sources changed.
26+ self.backend.Reload();
27+
28 # Show what we have early
29 self.window_main.show()
30

Subscribers

People subscribed via source and target branches

to status/vote changes: