Install single file from stage-packages

Hi! I’m trying to include just /usr/bin/timeout from the GNU coreutils package, since its other binaries are already whitelisted. Why doesn’t this work?:

    plugin: nil
    stage-packages: [coreutils]
      - -*
      - usr/bin/timeout

Remove - -*,


I will need to look into why that is a problem though, I don’t think we support negative globing like this.

Many thanks!

I copied the negative globs from Github, where they appear multiple times:

Sometimes I’m following Github samples blindly - in this case, I couldn’t find the documentation for filesets on

True, the current documentation is under restructuring,some information can be found here

I will nudge @degville to get search functionality in and for a fix on those dead links.

In the meantime, snapcraft help plugins should give some relevant information.

Yeah, the dead link is for “Working with filesets”. The search works, but I think this particular page is missing. The command you gave me works, though!

Thank you again!

Thanks for the nudge! We’ve just added search - there’s now a Search the documentation field at the top of pages, although there will likely be further refinements.

The broken links have been fixed in the updated The snapcraft format reference material, but I need to go back and make the same changes to Snapcraft.yaml reference as I really don’t want to remove an easily searchable single page.

I’ll look into adding something on filesets.

1 Like has a good section on filesets

Excellent - thank you!