Merge lp:~stgraber/ubiquity/ubiquity-dconf into lp:ubiquity

Proposed by Stéphane Graber
Status: Merged
Merged at revision: 5397
Proposed branch: lp:~stgraber/ubiquity/ubiquity-dconf
Merge into: lp:ubiquity
Diff against target: 87 lines (+21/-4) (has conflicts)
3 files modified
bin/ubiquity-dm (+8/-1)
debian/changelog (+10/-0)
ubiquity/gsettings.py (+3/-3)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~stgraber/ubiquity/ubiquity-dconf
Reviewer Review Type Date Requested Status
Ubuntu Installer Team Pending
Review via email: mp+102684@code.launchpad.net

Description of the change

11:38 < stgraber> cjwatson: I'm really not too happy about my last gsettings change (running in dbus-launch), we end up with ~10-15 dbus-daemon + dbus-launch running at the end
                  of the install
11:38 < stgraber> each of them with their own dconf-writer running, even though that "works" (AFAICT), I feel like I need to clean that up a little
11:39 < cjwatson> where was that change?
11:40 < stgraber> I think the root of the gsettings issue is that dconf-writer doesn't get killed properly and so doesn't dump its changes to disk, instead I think we should try
                  to spawn it from ubiquity-dm (maybe inside a dbus-launch call if that's what it needs) and kill that when ubiquity-dm exits
11:40 < stgraber> cjwatson: r5356 in ubiquity/gsettings.py
11:40 < stgraber> essentially a workaround for bug 960096
11:41 < ubot2> Launchpad bug 960096 in libxklavier "Live session started with wrong layout" [Medium,Confirmed] https://launchpad.net/bugs/960096
11:42 < cjwatson> do you think it's RC? I agree it's not particularly elegant, but ...
11:43 < cjwatson> maybe a branch staged for Q
11:43 < stgraber> yeah, I haven't seen any report of it blowing up, though I can't see how 10 dconf-writer running and writing to the same binary DB could be a good thing

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubiquity-dm'
2--- bin/ubiquity-dm 2012-04-02 14:54:39 +0000
3+++ bin/ubiquity-dm 2012-04-19 12:05:23 +0000
4@@ -155,6 +155,7 @@
5 signal.signal(signal.SIGUSR1, signal.SIG_IGN)
6
7 def run(self, *program):
8+ extras = []
9 null = open('/dev/null', 'w')
10 try:
11 os.makedirs('/var/log/installer')
12@@ -280,6 +281,13 @@
13 dbus_subp.stdout.close()
14 dbus_subp.wait()
15
16+ # dconf writer
17+ if os.path.exists("/usr/lib/dconf/dconf-service"):
18+ extras.append(subprocess.Popen(
19+ ['/usr/lib/dconf/dconf-service'],
20+ stdin=null, stdout=logfile, stderr=logfile,
21+ preexec_fn=self.drop_privileges))
22+
23 gconfd_running = False
24 if (self.frontend == 'gtk_ui' and
25 osextras.find_on_path('gconftool-2')):
26@@ -288,7 +296,6 @@
27 preexec_fn=self.drop_privileges)
28 gconfd_running = True
29
30- extras = []
31 if self.frontend == 'gtk_ui':
32 gconf_dir = ('xml:readwrite:%s' %
33 os.path.expanduser('~%s/.gconf' %
34
35=== modified file 'debian/changelog'
36--- debian/changelog 2012-04-19 11:48:07 +0000
37+++ debian/changelog 2012-04-19 12:05:23 +0000
38@@ -1,10 +1,20 @@
39 ubiquity (2.10.15) precise-proposed; urgency=low
40
41+ [ Colin Watson ]
42 * Fix crash when attempting to update the installer and a language isn't
43 selected for some reason (LP: #985368).
44 * Automatic update of included source packages: partman-target 77ubuntu2.
45
46+<<<<<<< TREE
47 -- Colin Watson <cjwatson@ubuntu.com> Thu, 19 Apr 2012 12:44:17 +0100
48+=======
49+ [ Stéphane Graber ]
50+ * Spawn dconf-service from ubiquity-dm and drop all the dbus-launch calls.
51+ This should ensure we have a single dconf-service running and that gets
52+ killed on ubiquity's exit.
53+
54+ -- Stéphane Graber <stgraber@ubuntu.com> Thu, 19 Apr 2012 14:02:28 +0200
55+>>>>>>> MERGE-SOURCE
56
57 ubiquity (2.10.14) precise-proposed; urgency=low
58
59
60=== modified file 'ubiquity/gsettings.py'
61--- ubiquity/gsettings.py 2012-04-04 22:16:32 +0000
62+++ ubiquity/gsettings.py 2012-04-19 12:05:23 +0000
63@@ -44,7 +44,7 @@
64 if not user:
65 user = os.getenv("SUDO_USER", os.getenv("USER", "root"))
66
67- subp = subprocess.Popen(['sudo', '-u', user, 'dbus-launch', 'gsettings', 'get', schema, key],
68+ subp = subprocess.Popen(['sudo', '-u', user, 'gsettings', 'get', schema, key],
69 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
70 preexec_fn=misc.drop_all_privileges)
71 value = subp.communicate()[0].rstrip('\n')
72@@ -98,7 +98,7 @@
73 if value == True:
74 value = "true"
75
76- subprocess.call(['sudo', '-u', user, 'dbus-launch', 'gsettings', 'set', schema, key, str(value)],
77+ subprocess.call(['sudo', '-u', user, 'gsettings', 'set', schema, key, str(value)],
78 preexec_fn=misc.drop_all_privileges)
79
80 def set_list(schema, key, values, user = None):
81@@ -115,5 +115,5 @@
82 if not user:
83 user = os.getenv("SUDO_USER", os.getenv("USER", "root"))
84
85- subprocess.call(['sudo', '-u', user, 'dbus-launch', 'gsettings', 'reset', schema, key],
86+ subprocess.call(['sudo', '-u', user, 'gsettings', 'reset', schema, key],
87 preexec_fn=misc.drop_all_privileges)

Subscribers

People subscribed via source and target branches

to status/vote changes: