Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Create Plainbox Provider plugin #364
Conversation
snappy-m-o
commented
Mar 3, 2016
|
Can one of the admins verify this patch? |
snappy-m-o
commented
Mar 3, 2016
|
Can one of the admins verify this patch? |
zyga
reviewed
Mar 4, 2016
| +deb http://${security}.ubuntu.com/${suffix} ${release}-security main restricted | ||
| +deb http://${security}.ubuntu.com/${suffix} ${release}-security universe | ||
| +deb http://${security}.ubuntu.com/${suffix} ${release}-security multiverse | ||
| +deb http://ppa.launchpad.net/checkbox-dev/ppa/ubuntu ${release} main |
zyga
Mar 4, 2016
Contributor
I'd use stable PPA here really or make this customizable with an explicit knob.
zyga
reviewed
Mar 4, 2016
| + | ||
| + | ||
| +setup( | ||
| + name='2016.com.example:simple', |
zyga
Mar 4, 2016
Contributor
I'd use plainbox-provider-example here with an explicit namespace="2016.com.example"
|
I've updated the code to make it possible to disable the Checkbox Development PPA. Also, switched to using an explicit namespace (kept the provider name "Simple" though"). |
|
OK to test |
|
retest this please |
coveralls
commented
Mar 21, 2016
coveralls
commented
Mar 21, 2016
coveralls
commented
Mar 21, 2016
|
retest this please |
|
retest this please |
|
add to whitelist |
|
retest this please |
coveralls
commented
Mar 23, 2016
elopio
reviewed
Mar 23, 2016
| + super().__init__(name, options) | ||
| + self.build_packages.extend(['python3-plainbox', 'intltool']) | ||
| + if self.options.checkbox_dev_ppa: | ||
| + self._PLUGIN_STAGE_SOURCES = self._DEV_PPA_PLUGIN_STAGE_SOURCES |
elopio
Mar 23, 2016
Member
this _PLUGIN_STAGE_SOURCES is not a constant, so it shouldn't be all capital letters.
_plugin_stage_sources.
elopio
Mar 23, 2016
Member
sorry, not from your branch. After you merge I'll propose something to change it.
For you, it seems safer to overwrite the PLUGIN_STAGE_SOURCES @property, instead of dealing with the internal attribute.
sergiusens
Mar 23, 2016
Collaborator
Yes, don't take advantage of internal implementation details which are subject to change
|
|
sergiusens
reviewed
Mar 23, 2016
| +description: | | ||
| + Create a snap of a very simple plainbox that could | ||
| + then be used by a checkbox application | ||
| +icon: icon.png |
|
|
|
Pushed commit with icon file removed from simple-plainbox-provider integration test. |
|
|
coveralls
commented
Mar 23, 2016
sergiusens
reviewed
Mar 23, 2016
| + schema['properties']['checkbox-dev-ppa'] = { | ||
| + 'type': 'boolean', | ||
| + 'default': 'true', | ||
| + } |
sergiusens
Mar 23, 2016
Collaborator
since you aren't overriding properties it seems you are making use of the common source options, can you add that piece of information to the doc string?
sergiusens
reviewed
Mar 23, 2016
| + | ||
| + def __init__(self, name, options): | ||
| + super().__init__(name, options) | ||
| + self.build_packages.extend(['python3-plainbox', 'intltool']) |
sergiusens
Mar 23, 2016
Collaborator
build-packages are installed onto the host from the hosts defined sources.list[.d]; in the documentation above you mention that plainbox features are not completely in the archive. How does adding python3-plainbox here play into this?
|
Thanks for this, I have a bunch of open questions in there though. Also, does this rely on python provided by the os snap? It is fine from my PoV, just want to make sure. |
|
Given the previous comment I would like to see an example and an example_test (which would run on a snappy system) |
|
The example test would be so nice, indeed. |
|
Thank you for the reviews, I will put an example together and try and address the questions ASAP. |
coveralls
commented
Mar 24, 2016
coveralls
commented
Mar 24, 2016
coveralls
commented
Mar 24, 2016
coveralls
commented
Mar 24, 2016
coveralls
commented
Mar 24, 2016
coveralls
commented
Mar 29, 2016
|
I have added integration tests to cover a set of what I think are expected use cases for this plugin. One of these fails with a python import error for module 'plainbox'. This is provided by the package python3-plainbox which is explicitly added to the build-package list by the plugin. I would like to know how to guarantee that 'build-package' works as advertised. |
|
@jocave build-packages will just land on the host and be used to build the system, there is additional magic to crawl everything ELF and bring in any .so it needs not provided in the snap/part area. stage-packages however, which is what you use in your examples are a bit tricky, specially when it comes to python as you will need to define a Given this still needs a few twists and turns I am going to close it for now. Feel free to reopen when ready. |
jocave commentedMar 3, 2016
lp: #1552369
It would be useful if this plugin could be released on to the 1.x series as well.