You’re missing the dump plugin, which just dumps the contents of your deb (or other archive types like .zip, .tar.gz, etc) into your snap tree.
It is not required to install a deb with dpkg because a deb is just an archive.
As an example, here’s how I’ve done it:
does the use of plugin: dump, means that while i install my .snap file, the deb file will be installed as well?
if i understood properly, it will just dump the deb file into the snap part folder. if so how can i install the deb during the snap installation?
The contents of your deb package will be extracted into the snap (parts folder) and shipped alongside, so no need to do anything. What you then need are the snap specific definitions like the app part with its command section and plugs. Please see the full example linked above, as it includes everything to basically convert a deb into a snap package.
You can inspect your snap contents after building and navigate the tree structure to check with: snapcraft --shell-after
this will open a shell chrooted inside your snap after the build has finished.
OK, i think i understood the differences:
in your source: you wrote a URL, which snapcraft takes and then the ‘dump’ plugin extract the deb to the snap folders.
In my example above, I override the pull and downloaded the deb from S3, therefore when using the ‘dump’ plugin it just copy the deb file itself to the snap folder instead of extract it.
once i change the source to URL (as your example) the dump plugin works as expected.
It is not, the general concept I wanted to expose is that if you download in pull and build or operate with those sources in build, then you can iterate a bit more easily.