The change includes:
. Start using the tool snaps-state
. Remove includes for snaps.sh
. Cleanup snaps.sh helper
. Update snaps-state too to include repack with target dir
The idea of this change is to avoid source strings.sh and create a new
tool to manage strings.
This change also includes a test for the new to-one-line ool
When installing a strict snap withthe --classic snap like:
snap install strict-snap --classic
this should be allowed because the user expresses that he/she is willing to install a classic snap.
If the snap is not classic that is even better and no reason to error (a warning is appropriate to
ensure the user is not under the misconception that the snap gets installed with classic confinement).
* overlord/snapstate: silently ignore classic flag when installing a non classic snap
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* cmd/snap: warn when --classic flag was ignored
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* overlord/snapstate: review feedback
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* tests/main/install-errors: verify --classic flag for non-classic snaps
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* cmd/snap: display warning before snap install summary
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* tests/main/install-errors: fix error match
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
* travis: quote Go version
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Right now it is possible to install a strictly confined snap as in
classic confinement mode with:
```
snap install --classic test-snapd-tools
```
This should not work.
Changes:
. Using test-snapd-just-{edge,beta} snaps
. Snap test-snapd-only-in-edge replaced (tests udpated)
. searching test updated to search snaps on edge and beta channels
changes:
. Add extra spaces and new lines
. Try to use install_local when possible
. Remove not needed echo
. Re-order test tags
. Use lists for systems
. Replace description tags
. Minor changes on test checks
If somebody copy-pastes a snap command from a blog they might end up
getting something like
snap install atom ––classic
which looks OK until you realise those are en dashes. The resulting
error will be very hard to understand (even ignoring the fact that the
error itself right now is wrong; that's a separate issue).
This detects the situation and prints a hopefully helpful hint before
the error.
This uses the new extra "releases" information on store "revision-not-found" errors to produce better errors when a revision is not available for the given channel or architecture.
The extra information when available is passed back over the snapd API using two new error kinds:
* snap-channel-not-available
* snap-architecture-not-available
ShellCheck 0.5.0 picks up more issues than the 0.4.6 version we currently use in
the tests.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>