Merge lp://qastaging/~mvo/snapcraft/copy-plugin into lp://qastaging/~snappy-dev/snapcraft/core

Proposed by Michael Vogt
Status: Superseded
Proposed branch: lp://qastaging/~mvo/snapcraft/copy-plugin
Merge into: lp://qastaging/~snappy-dev/snapcraft/core
Prerequisite: lp://qastaging/~mvo/snapcraft/python3-project
Diff against target: 276 lines (+170/-7)
12 files modified
debian/control (+1/-0)
examples/py3-project/meta/package.yaml (+1/-1)
examples/py3-project/snapcraft.yaml (+4/-0)
integration-tests/data/simple-copy/snapcraft.yaml (+5/-0)
integration-tests/data/simple-copy/src (+1/-0)
integration-tests/units/jobs.pxu (+9/-0)
plugins/copy.yaml (+4/-0)
snapcraft/plugins/copy.py (+37/-0)
snapcraft/tests/__init__.py (+7/-4)
snapcraft/tests/fixture_setup.py (+29/-0)
snapcraft/tests/test_copy_plugin.py (+69/-0)
snapcraft/tests/test_plugin.py (+3/-2)
To merge this branch: bzr merge lp://qastaging/~mvo/snapcraft/copy-plugin
Reviewer Review Type Date Requested Status
Michael Terry (community) Needs Fixing
Review via email: mp+264706@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2015-07-22.

Description of the change

This branch adds a copy plugin. It will copy artifacts into the snap dir. It makes the python3 example a fully working sha3sum that fetches the sha3 lib from github.

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

Feels weird for this to be an add-on to the python3 branch, but I understand how we got here. :)

Yay for tests! :)

Some questions inline.

Revision history for this message
Michael Terry (mterry) :
81. By Michael Vogt

merged lp:~mvo/snapcraft/python3-project

82. By Michael Vogt

merged lp:~mvo/snapcraft/python3-project

83. By Michael Vogt

address review comments from mike

84. By Michael Vogt

merged lp:~mvo/snapcraft/copy-plugin

85. By Michael Vogt

update tests

86. By Michael Vogt

add mkdir option to the copy plugin

87. By Michael Vogt

snapcraft/cmds.py: ignore symlinks so that the python3 symlink is not replaced with a python3.real empty file

88. By Michael Vogt

merged lp:~mvo/snapcraft/python3-project

Revision history for this message
Michael Terry (mterry) wrote :

Merge conflict now, plus some comments.

89. By Michael Vogt

merged lp:~mvo/snapcraft/python3-project

90. By Michael Vogt

merged lp:snapcraft and resolved conflicts

91. By Michael Vogt

improve copy tests

92. By Michael Vogt

remove mkdir option and create missing prefix paths automatically

93. By Michael Vogt

snapcraft/cmds.py: remove my erroneous symlink test in wrapBinaries

94. By Michael Vogt

merged lp:~mvo/snapcraft/python3-project

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks. I fixed the merge conflicts and addressed the comments.

Revision history for this message
Michael Vogt (mvo) wrote :

I'm happy to tell that I did a successful end-to-end test with the py3-example:

$ cd examples/py3-project
$ ../../bin/snapcraft all
created spongeshaker_0_all.snap

which I copied into my kvm snappy and there it works flawlessly:

(amd64)ubuntu@localhost:~/apps/spongeshaker.sideload/0$ spongeshaker.sha3sum $(pwd)/foo
6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7

(within the limits of the confinement of course).

95. By Michael Vogt

merged lp:~mvo/snapcraft/python3-project/

Revision history for this message
Michael Terry (mterry) wrote :

Inline comments, looking nice :)

Revision history for this message
Michael Terry (mterry) wrote :

The tempdir stuff got upstaged a little by https://code.launchpad.net/~elopio/snapcraft/test_tmp_cwd/+merge/265352

Maybe rebase?

96. By Michael Vogt

merged lp:snapcraft

Revision history for this message
Ted Gould (ted) wrote :

Not to stop this MR, but when I pulled in both this and the focused-assemble branch I had to change the simple copy test to:

id: snapcraft/normal/simple-copy
plugin: shell
estimated_duration: 0.5
command:
    set -ex
    cp -rT $PLAINBOX_PROVIDER_DATA/simple-copy .
    snapcraft stage
    test "$(cat ./stage/dst)" = "I got copied"

Who ever gets merged first, the other branch will have to do that.

Revision history for this message
Michael Terry (mterry) wrote :

mvo, you merged trunk but didn't address the issues I mentioned on the last revision (typo and a logic error). Just didn't want those to get lost, since LP hides them after the branch gets updated. :-/

review: Needs Fixing
97. By Michael Vogt

address excellent review points from Mike Terry

98. By Michael Vogt

merged lp:~elopio/snapcraft/test_tmp_cwd/ and updated the code to use it

Revision history for this message
Michael Vogt (mvo) wrote :

Hey Mike, thanks a bunch, for some reason I missed the earlier inline comments. I addressed them now and merged https://code.launchpad.net/~elopio/snapcraft/test_tmp_cwd/+merge/265352 for the tempdir handling.

Revision history for this message
Michael Terry (mterry) wrote :

You have to rebase / update the pre-requisate against test_tmp_cwd.

Revision history for this message
Michael Terry (mterry) wrote :

(but looks good besides)

Revision history for this message
Michael Terry (mterry) wrote :

Oh, you did! I missed that ;) Ignore me. Will go look at https://code.launchpad.net/~mvo/snapcraft/copy-plugin/+merge/265553

99. By Michael Vogt

pep8

Unmerged revisions

99. By Michael Vogt

pep8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches