snappy source foo

Mark Shuttleworth mark at
Sat Oct 31 05:18:58 UTC 2015

On 31/10/15 14:00, Ted Gould wrote:
> On Fri, 2015-10-30 at 19:58 +0900, Dustin Kirkland wrote:
>> One thing I'm really missing in the apt-to-snappy transition is easy
>> access to source code.
>> ie, the equivalent of 'apt-get source foo'.
>> I understand that not all snaps will provide source code, but today,
>> many of them are in fact open source.
>> Could the snappy development team please consider adding a field to
>> the meta/package.yaml which specifies where (git, bzr, elsewhere) the
>> upstream source code of the snap itself is hosted, and loop in a
>> command 'snappy source foo' that does the right thing, using the
>> right
>> tool, to fetch the source, when possible?
> I think that it's a good idea, but I don't think that it's that simple
> though. The reality is that a snap could be made of from a variety of
> sources, and just a single link doesn't describe enough to be able to
> do many of the things that you can with apt-get source.
> I'd propose that instead we leave the parts has a high level item in
> the packages.yaml and basically make it so that we have one format.
> Then you'd have the information to rebuild the snap, if you had access
> to the repositories that held the files. Proprietary vendors could just
> not ship the parts key to avoid giving out private repo names. This way
> you could get all the sources that were used for that snap, not just
> the base one.

I think the point is to be able to get, where available, the
snapcraft.yaml and tree. That would in turn lead you to the various
parts, which specify their sources explicitly.


  $ snappy source foo
  No source provided by sabdfl for foo
  $ snappy source foo.beuno
  Source is available for foo.beuno but foo.beuno/ directory already
exists, please specify alternate target.
  $ snappy source foo.beuno src-foo
  Fetching source for foo.beuno...
  Checking out git://url/foo into src-foo/
  $ cd src-foo
  $ snapcraft

Or some such. The point is not to guarantee source availability, just to
provide a starting point for someone who wants to branch the project.

I'd suggest something like this in snapcraft.yaml

  source: url / vcs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the snappy-devel mailing list