Bug #1776807 “`nil` plugin shouldn't pull anything to the srcdir” : Bugs : Snapcraft

(Shamelessly copied from https://bugs.launchpad.net/snapcraft/+bug/1776807 for more attention)

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 ccahe, 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
├── README.md
└── screenshots
    └── view-image-control.png

2 directories, 8 files

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

1 Like

Currently a nil part’s pull state file has the source: . definition.

Is this fixed in the 3.0.1 release? I see the bug status as fixed and released, but I still observe this behavior.

This ‘feature’ is preserved if you’re using the legacy syntax(not specifying the base keyword)

Refer: Remote part considered as "source changed"

There’s a workaround available: Remote part considered as "source changed"