Dump archive without extracting

Hi all,

What’s the best way to define a part that simply downloads a tarball without extracting it?

I’ve tried a few things including re-compressing it after dump has extracted it however figured there must be a simpler way. Something like:

parts:
  my-part:
    plugin: dump
    source: https://example.com/file.tar.gz
    override-build: ''

Thanks

The best way to do this, in my opinion, would be to use the nil plugin and script it yourself:

parts:
  download-tarball:
    plugin: nil
    override-pull: |
      wget https://example.com/file.tar.gz
    override-build: |
      install -m644 -D -t $SNAPCRAFT_PART_INSTALL file.tar.gz
2 Likes

and:

    build-packages:
      - wget

:wink:

3 Likes

oops. yes, I forgot that bit :wink:

Thanks Dan and Ogra, perfect solution :slight_smile: