Merge lp://staging/~ted/snapcraft/qml into lp://staging/~snappy-dev/snapcraft/core

Proposed by Ted Gould
Status: Merged
Approved by: Michael Terry
Approved revision: 116
Merged at revision: 126
Proposed branch: lp://staging/~ted/snapcraft/qml
Merge into: lp://staging/~snappy-dev/snapcraft/core
Prerequisite: lp://staging/~ted/snapcraft/wrapper-path
Diff against target: 379 lines (+179/-17)
17 files modified
examples/qmldemo/demo.qml (+9/-0)
examples/qmldemo/meta/package.yaml (+10/-0)
examples/qmldemo/meta/readme.md (+4/-0)
examples/qmldemo/snapcraft.yaml (+8/-0)
integration-tests/data/assemble/binary1.after (+1/-1)
plugins/ubuntu.yaml (+3/-1)
snapcraft/cmds.py (+2/-2)
snapcraft/plugins/copy.py (+1/-1)
snapcraft/plugins/jdk.py (+1/-1)
snapcraft/plugins/python2.py (+1/-1)
snapcraft/plugins/python3.py (+1/-1)
snapcraft/plugins/qml.py (+125/-0)
snapcraft/plugins/tests/test_ubuntu.py (+1/-1)
snapcraft/plugins/ubuntu.py (+8/-4)
snapcraft/tests/test_cmds.py (+1/-1)
snapcraft/tests/test_ubuntu_plugin.py (+1/-1)
snapcraft/tests/test_yaml.py (+2/-2)
To merge this branch: bzr merge lp://staging/~ted/snapcraft/qml
Reviewer Review Type Date Requested Status
Michael Terry (community) Approve
Leo Arias (community) Needs Fixing
Review via email: mp+265720@code.staging.launchpad.net

This proposal supersedes a proposal from 2015-07-22.

Commit message

QML Plugin

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

Same pita comment about the format instead of %.

I'm leaving a needs fixing because of the naked except.

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

Have to run before finishing, but noted a few things in the comments.

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

On Thu, 2015-07-23 at 19:05 +0000, Leo Arias wrote:

> > + except:
>
> Can you list the exceptions that you want to ignore? I suppose you want to ignore if the dir already exists, or something like that.

Fixed r102

> > + pass
> > + config = open(os.path.join(configdir, 'snappy-qt5.conf'), 'w')
> > + config.write("./usr/lib/%s/qt5/bin\n" % arch)
>
> ..format instead of %, please.

Fixed r103

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

On Fri, 2015-07-24 at 16:59 +0000, Michael Terry wrote:

> > + def build_qt_config(self):
> > + # TODO figure this out
> > + arch = 'x86_64-linux-gnu'
>
> Yeah, I think we want a central bit of code to ask "what is our current arch triplet?" and "what is our current arch shortname?"

I did that, but then I also added the feature to put the architecture in
the package if it isn't defined.

> > if options.package:
> > - self.included_packages.append(options.package)
> > + if type(options.package) is list:
> > + self.included_packages.extend(options.package)
> > + else:
> > + self.included_packages.append(options.package)
>
> This makes me nervous. I like the one-package-one-plugin thing. But I get that it causes an increase in likely conflicts...
>
> If we make it a list, let's just change the field to 'packages' instead of 'package' and support only a list...

Fixed, r104.

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

On Tue, 2015-07-28 at 14:38 +0000, Michael Terry wrote:

> > + include.append('./etc/xdg/qtchooser/snappy-qt5.conf')
>
> Why is this necessary? The default include should be '*'

It isn't strictly, but that '*' is put in by the Ubuntu plugin, and I
don't think we should be dependent on it doing that.

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

Comments! :) Looking good.

Revision history for this message
Daniel Holbach (dholbach) wrote :

This is more of a suggestion, but maybe we could add an example or a quick howto to ./docs so app developers know how to use it or have a cheatsheet or something?

Revision history for this message
Daniel Holbach (dholbach) wrote :

Nevermind. Just noticed the example. I was more wondering if we could take something more complex, like a core app as an example. :-)

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

On Fri, 2015-07-31 at 20:46 +0000, Michael Terry wrote:

> > +options:
> > + qml:
> > + required: false
>
> Why isn't this required: true?
>
> It also doesn't seem to be used anywhere right now. Because we don't allow automatically adding new binaries, I'm guessing. Let's drop this option for now and revisit the editing of yaml separately.

Yes, it was just cruft. Removed. r110

> > + if not package.get('architecture', None):
> > + package['architecture'] = common.get_arch()
> > +
>
> You also need to check for 'architectures'.
>
> Might be better to rebase on the arch-fixes branch.

Merged trunk.

> > === modified file 'snapcraft/plugins/copy.py'
> > --- snapcraft/plugins/copy.py 2015-07-23 14:23:29 +0000
> > +++ snapcraft/plugins/copy.py 2015-07-30 20:40:25 +0000
> > @@ -37,5 +37,5 @@
> > dst_dir = os.path.dirname(dst)
> > if not os.path.exists(dst_dir):
> > os.makedirs(dst_dir)
> > - res &= self.run(["cp", "--preserve=all", src, dst], cwd=os.getcwd())
> > + res &= self.run(["cp", "--preserve=all", "-R", src, dst], cwd=os.getcwd())
>
> This looks unrelated. You don't actually use the recursive change here in this branch elsewhere, do you?
>
> That said, it's probably a good change.

It is and isn't, olli needed it and so I wanted to give him one
branch :-)

> > === modified file 'snapcraft/plugins/ubuntu.py'
> > --- snapcraft/plugins/ubuntu.py 2015-07-23 14:23:29 +0000
> > +++ snapcraft/plugins/ubuntu.py 2015-07-30 20:40:25 +0000
> > @@ -35,12 +35,18 @@
> > self.included_packages = []
> > if options.package:
> > self.included_packages.append(options.package)
> > + elif options.packages:
> > + self.included_packages.extend(options.packages)
>
> Should probably error out if both are set.
>
> Or maybe just rename package to packages?

Only 'packages': r112

> > + if options.recommends is None:
> > + self.recommends = False
> > + else:
> > + self.recommends = options.recommends
>
> Could be:
> self.recommends = options.recommends or False

r113

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

On Wed, 2015-08-05 at 13:44 +0000, Daniel Holbach wrote:

> Nevermind. Just noticed the example. I was more wondering if we could take something more complex, like a core app as an example. :-)

Core apps aren't really possible because they depend on the SDK, which
requires a fair number of services that we don't have in a base snappy
system. Basically they need the "Unity 8 framework" which doesn't yet
exist.

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

One tiny comment. And I would like to preserve the implicit package name if no packages value is provided.

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

Looks good, thanks! :)

review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Michael Terry (mterry) :
review: Approve

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

to all changes: