Using package-management in snapcraft

I am trying to install the edge version of snapcraft to take advantage of the package-management pr. I have updated snapcraft, as can be seen here:

name:      snapcraft
summary:   easily create snaps
publisher: Canonical✓
store-url: https://snapcraft.io/snapcraft
contact:   https://forum.snapcraft.io/c/snapcraft
license:   GPL-3.0
description: |
  Package, distribute, and update any app for Linux and IoT.
  
  Snaps are containerised software packages that are simple to create and install. They auto-update
  and are safe to run. And because they bundle their dependencies, they work on all major Linux
  systems without modification.
commands:
  - snapcraft
snap-id:      vMTKRaLjnOJQetI78HjntT37VuoyssFE
tracking:     latest/edge
refresh-date: today at 22:50 EDT
channels:
  latest/stable:    3.11                 2020-04-08 (4282) 63MB classic
  latest/candidate: 4.0.2                2020-05-16 (4761) 67MB classic
  latest/beta:      ↑                                           
  latest/edge:      4.0.2+git1.gd69d3c53 2020-05-18 (4767) 67MB classic
installed:          4.0.2+git1.gd69d3c53            (4767) 67MB classic

But when I run sudo snapcraft --use-lxd, I just get:
Issues while validating snapcraft.yaml: Additional properties are not allowed ('package-management' was unexpected)
Is it because I’m using lxd? (I can’t use Hyper V because my old computer doesn’t support the neccessary bios extensions)

Looking at the release notes, it looks like you want package-repositories:

1 Like

James Henstridge via snapcraft.io forum@forum.snapcraft.io writes:

  • jamesh
    May 20

Looking at the release notes, it looks like you want package-repositories:

You also need to set the experimental flag, run the following for more information about that:

snapcraft snap --help
1 Like

Fantastic! Thank you for your help guys. I was stuck on the pr’s implementation, as you can probably tell. I wasn’t aware the new candidate release changed the syntax. It looks like it’s working now, so that’s good.

1 Like