Merge lp:~sergiusens/snapcraft/1497108 into lp:~snappy-dev/snapcraft/core

Proposed by Sergio Schvezov
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 187
Merged at revision: 188
Proposed branch: lp:~sergiusens/snapcraft/1497108
Merge into: lp:~snappy-dev/snapcraft/core
Diff against target: 22 lines (+5/-7)
1 file modified
snapcraft/cmds.py (+5/-7)
To merge this branch: bzr merge lp:~sergiusens/snapcraft/1497108
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Review via email: mp+271855@code.launchpad.net

Commit message

Use relative paths for image creation

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

I don't understand this, but it works, so +1.

Should this be a bug on udf? or is something that python's exec causes?

review: Approve
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On Mon, Sep 21, 2015 at 8:38 PM, Leo Arias <email address hidden> wrote:

> Review: Approve
>
> I don't understand this, but it works, so +1.
>
> Should this be a bug on udf? or is something that python's exec causes?
>

I am thinking kpartx fails on char [MAXLEN] or something like that. I
forgot to assign it earlier in the report

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'snapcraft/cmds.py'
2--- snapcraft/cmds.py 2015-09-18 16:59:41 +0000
3+++ snapcraft/cmds.py 2015-09-21 18:50:34 +0000
4@@ -163,13 +163,11 @@
5 qemudir = os.path.join(os.getcwd(), "image")
6 qemu_img = os.path.join(qemudir, "15.04.img")
7 if not os.path.exists(qemu_img):
8- try:
9- os.makedirs(qemudir)
10- except FileExistsError:
11- pass
12- common.run(
13- ['sudo', 'ubuntu-device-flash', 'core', '--developer-mode', '--enable-ssh', '15.04', '-o', qemu_img],
14- cwd=qemudir)
15+ os.makedirs(qemudir, exist_ok=True)
16+ common.run([
17+ 'sudo', 'ubuntu-device-flash', 'core', '15.04', '--developer-mode',
18+ '--enable-ssh', '-o', os.path.relpath(qemu_img, qemudir)],
19+ cwd=qemudir)
20 qemu = None
21 try:
22 # Allow the developer to provide additional arguments to qemu. This

Subscribers

People subscribed via source and target branches