RFC: snapcraft sources keyword for parts
robert_joslyn at selinc.com
robert_joslyn at selinc.com
Fri Nov 6 17:41:42 UTC 2015
> We would like to (appropriately deprecate this) and change
> that to a source object, in that sense it would look like:
>
> source:
> (yaml object)
>
> - type
> (string)
> Determines a source implementation to use, similar to plugins.
>
>
> So then, type: launchpad can have some launchpad specific
> keywords like
>
> - project
> (string)
> launchpad project to use
>
> - series
> (string)
> series to branch
>
> and other relvant to bzr.
>
>
> As a git type would have: repo, branch, tag etc..
>
> The advantage of this is we don't contaminate the part with
> source-.* keywords and each source type can have its specific
> keywords.
>
> We also plan to support/autodetect plain source entries.
Something else that I just came across, and that you may want to keep in
mind, is how to deal with patching. Frequently, we maintain small patch
sets for upstream repositories that we use. With Snapcraft, I don't really
have a clean way of fetching upstream sources, fetching internal patches,
and applying patches before the compile.
One very generic way of dealing with this is to provide a pre-compile hook
that would allow Snapcraft to call out to a script after pulling but
before attempting the compile. This would provide a way to patch the
sources, or do any other needed manipulation of the source before the
compile. Perhaps a nicer way is to have additional keywords for the source
type that would allow fetching of patches and automatically applying them.
Thanks,
--
Robert Joslyn
Software Engineer, R&D - Automation
Schweitzer Engineering Laboratories
509-332-1890 ext. 3214
More information about the snappy-app-devel
mailing list