Merge lp:~vorlon/ubiquity/lp.947738 into lp:ubiquity

Proposed by Steve Langasek
Status: Merged
Merged at revision: 5393
Proposed branch: lp:~vorlon/ubiquity/lp.947738
Merge into: lp:ubiquity
Diff against target: 43 lines (+16/-2) (has conflicts)
2 files modified
debian/changelog (+11/-0)
scripts/plugininstall.py (+5/-2)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~vorlon/ubiquity/lp.947738
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Evan (community) Approve
Review via email: mp+102785@code.launchpad.net

Description of the change

This may just be kicking the can down the road as far as bug #947738 is
concerned, since if 'sudo' fails in the target system, all kinds of things
are going to fail later on; but maybe the place for ubiquity to fail isn't
in the webcam plugin script?

To post a comment you must log in.
Revision history for this message
Evan (ev) wrote :

Looks reasonable enough, especially considering we will never know exactly what happened in that bug. Sudo will complain loudly so I think the lack of logging an error in this case is okay.

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

Agreed. Though maybe in the future we should do the Python equivalent of 'chown --reference /home/user /home/user/.face' rather than mucking around with sudo.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-04-19 11:48:07 +0000
3+++ debian/changelog 2012-04-20 03:03:20 +0000
4@@ -1,3 +1,4 @@
5+<<<<<<< TREE
6 ubiquity (2.10.15) precise-proposed; urgency=low
7
8 * Fix crash when attempting to update the installer and a language isn't
9@@ -6,6 +7,16 @@
10
11 -- Colin Watson <cjwatson@ubuntu.com> Thu, 19 Apr 2012 12:44:17 +0100
12
13+=======
14+ubiquity (2.10.15) UNRELEASED; urgency=low
15+
16+ * If we can't figure out the target user's uid/gid, don't copy the photo
17+ to the user's home directory. Addresses the immediate symptom of bug
18+ #947738, if not the root cause.
19+
20+ -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 19 Apr 2012 19:53:56 -0700
21+
22+>>>>>>> MERGE-SOURCE
23 ubiquity (2.10.14) precise-proposed; urgency=low
24
25 [ Colin Watson ]
26
27=== modified file 'scripts/plugininstall.py'
28--- scripts/plugininstall.py 2012-04-19 02:26:48 +0000
29+++ scripts/plugininstall.py 2012-04-20 03:03:20 +0000
30@@ -277,8 +277,11 @@
31 gid = subprocess.Popen(['chroot', self.target, 'sudo', '-u',
32 target_user, '--', 'id', '-g'], stdout=subprocess.PIPE)
33 gid = gid.communicate()[0].strip('\n')
34- uid = int(uid)
35- gid = int(gid)
36+ try:
37+ uid = int(uid)
38+ gid = int(gid)
39+ except ValueError:
40+ return
41 if os.path.exists(PHOTO_PATH):
42 targetpath = os.path.join(self.target, 'home', target_user, '.face')
43 shutil.copy2(PHOTO_PATH, targetpath)

Subscribers

People subscribed via source and target branches

to status/vote changes: