Preprocessing snapcraft part files
Mike Berger
mabnhdev at gmail.com
Wed Dec 16 12:55:25 UTC 2015
The repositories come from two different and independent sources. Local
changes would not be appropriate to push upstream. I could, of course,
keep a local mirror of the repository with my changes pushed to the mirror,
but would more or less break the dependency chain.
I agree about the this being more appropriate as a Makefile change.
However, I hope to avoid modifying upstream repositories whenever possible
- especially this early in the cycle. So, I'm looking to preserve the
existing repository mechanisms for now.
I think the declarative pre-processing mechanism in snapcraft would be
helpful - especially when developing or assembling snaps. You might also
have some type of "lintian" or other check that would call attention to any
snap that was crafted using such "development" mechanisms when a snap is
placed into a store.
That being said, I can also understand and appreciate the view that
snapcraft is not the appropriate place to be dealing with this kind of
disruption to the workflow.
Regards, Mike
On 16 December 2015 at 02:36, Mark Shuttleworth <mark at ubuntu.com> wrote:
>
> Interesting use case, thanks for mailing the list.
>
> We already support sequenced operations (with the "after" keyword) so
> it's pretty clear how you would have the one part built after another part.
>
> What's more interesting is having pre-processing steps. I think we quite
> strongly want to avoid having a turing-complete packaging system, which
> means that any code itself needs to be in the repositories that come
> with the parts. Are you able to commit to the upstream repository? Are
> there single commands which would perform the needed steps? If so we
> could think about having a declarative pre-processing mechanism in
> snapcraft.yaml which essentially says to the plugin "do this before you
> do what you normally do". It's just that "this" would be much easier to
> define if it were something expressed in the repository itself, like a
> Makefile target.
>
> Would that help?
>
> Mark
>
> On 15/12/15 21:52, Mike Berger wrote:
> > I'm trying to create a snap where I need to preprocess pull'ed files
> before
> > building them. I'm hoping someone can give me a strategy to attack the
> > problem.
> >
> > I have one git repository that contains some generic schema files.
> Within
> > this repository is a python command, transform.py, used to transform the
> > generic schema files into a build-specific schema files.
> >
> > I then have second git repository that comes with (different) generic
> > schema files. I need to replace the schema files in this second
> repository
> > with the build-specific schema files that were generated in the first
> > repository.
> >
> > I then need to build the second repository using the autotools plugin.
> >
> > Any suggestions on how I can make snapcraft perform the above operations?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20151216/23d29d52/attachment.html>
More information about the snappy-app-devel
mailing list