This seems to be caused by extra files in the project directory that shouldnât be there (maybe leftovers from a previous execution in destructive mode?). Note that inside the container our work directory is /root/part instead of /root/project/part â the latter is considered part of the project. To solve this, remove directories parts, stage, prime from the project directory, run snapcraft clean to start from a well-defined state and pack again.
Maybe Iâm misunderstanding the migration guide? A command-chain allowed for more than just control over the appâs environment. In the past Iâve used it for running snapcraft_preload, providing a wrapper script that dynamically sets env vars for a number of apps based on snap configuration, or using setpriv from a script to run postgresql as the snap_daemon user (these are all examples from the edgexfoundry snap).
You can still use command-chain, what you donât have anymore is snapcraftâs opinionated command chain that you could not easily or selectively get rid of
Thanks, that worked! Said this, if having a folder named parts, prime, etc. is going to be a problem it would be nice to print a more intuitive error message when they are detected. While developing a snap is not unusual to run into this type of situation.
Having these directory names is not a problem, but having superuser-owned files inside them (or in any place under the project subtree) thatâs overwritten by the build process is the real issue, because they wonât be writable inside the container (in this case, it happened with the lock file). But we can add a warning if those directories are detected, even when itâs harmless.
It looks like parsing metadata from an AppStream file doesnât work.
Using core22 base, this can be built with snapcraft 6.1 but not snapcraft 7.0.2:
Getting the following error:
2022-06-01 17:45:12.719 :: 2022-06-01 15:45:12.234 extract metadata: parse info from edgex-device-usb-camera.metainfo.xml
2022-06-01 17:45:12.719 :: 2022-06-01 15:45:12.234 Field 'summary' was not adopted from metadata
After adding a local summary:
2022-06-01 20:31:21.975 :: 2022-06-01 18:31:21.356 Extracting and updating metadata...
2022-06-01 20:31:21.975 :: 2022-06-01 18:31:21.357 Field 'description' was not adopted from metadata
I can build after adding both local summary and description.
I am sorry to say that we decided to move the release to latest/stable to 2022-06-13T03:00:00Z, we will soon be releasing 7.0.3 (https://github.com/snapcore/snapcraft/releases/tag/7.0.3) to 7.x/candidate and latest/candidate (as soon as one of the architectures the snap uses finishes its build)
$ snapcraft plugins --base core22
Usage: snapcraft plugins [OPTIONS]
Try 'snapcraft plugins -h' for help.
Error: Invalid value for '--base': 'core22' is not one of 'core18', 'core20'.
$ snapcraft list-keys
Retrieving credentials for 'snapcraft' on 'dashboard.snapcraft.io' from keyring 'SecretService Keyring'.
Credentials not found in the keyring 'SecretService Keyring'
craft-store error: No credentials found for 'snapcraft' on 'dashboard.snapcraft.io'.
Full execution log: '/home/espy/.cache/snapcraft/log/snapcraft-20220610-181647.111512.log'
This one also caught me by surprise⊠is snapcraft now just using the userâs default keyring (~/.gnupg/pubring.kbx)?