Non-snapcraft-generated files are pulled when nil plugin is used

Consider this snapcraft parts recipe:

    plugin: nil
      - ccache
    override-build: 'true'
    override-stage: 'true'
    override-prime: 'true'

And according to the description of snapcraft help nil:

The nil plugin is useful for parts with no source.

However after running snapcraft pull ccache, non-snapcraft-generated files in the source tree are pulled into the part’s sourcedir:

├── guvcview-brlin_source.tar.bz2
├── guvcview.strace.log
├── icons
│   ├── guvcview256.png
│   └── guvcview.png
├── nohup.out
└── screenshots
    └── view-image-control.png

2 directories, 8 files

IMO the behavior is unexpected and should be a snapcraft bug.


Override the entire pull step using scriptlets.

This bug has been filed to Bug #1776807 “nil plugin shouldn’t pull anything to the srctre…” : Bugs : Snapcraft.