-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Bug Description
This is pretty hard to reproduce and not specifically a bug in snapcraft (I put it here to keep it logged somewhere, as I'm unsure where the fix needs to go). @bepri encountered this today when trying to update a snapcraft.yaml file
What happened is that his LXD base image used for snapcraft was created before noble-updates got a cargo-1.85 package, so adding it as a build-package caused craft-parts to fail when trying to install it (because there was no package with that name).
Possible fixes:
- Asynchronously run
apt updateon boot. - Always update before installing build-packages (up side: gets the latest packages. Down side: very slow)
- If there are errors when installing build-packages, run update and try again before failing.
This is also the sort of thing that could be worked around by a user if we implemented a purge command for all apps. That's not a fix, but it makes these types of bugs less annoying for users since they don't have to manually mess with the lxd project
To Reproduce
- Create a snapcraft.yaml file that adds your own PPA or similar.
- Run
snapcraft pack - Add a new package (that's not in the Ubuntu repos) to that PPA
- Add that package to the
build-packagesfor a part
Expected behaviour: It installs that build package
Actual behaviour: It complains that the package does not exist
Environment
n/a
snapcraft.yaml
n/aRelevant log output
n/aAdditional context
No response