New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
daemon: do not allow to install ubuntu-core anymore #3289
Conversation
There is no need to install ubuntu-core anymore with current snapd. People with existing installs will auto-transition to core on the next refresh. LP: #1689332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two nitpicks but feel free to ignore and land
tests/main/install-errors/task.yaml
Outdated
echo "Installing ubuntu-core should fail" | ||
exit 1 | ||
fi | ||
cat stderr.out | MATCH "cannot install \"ubuntu-core\", please use \"core\" instead" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, use single quotes here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed
daemon/api.go
Outdated
@@ -910,6 +910,20 @@ func snapUpdateMany(inst *snapInstruction, st *state.State) (msg string, updated | |||
return msg, updated, tasksets, nil | |||
} | |||
|
|||
func verifySnapInstructions(inst *snapInstruction) error { | |||
if inst.Action == "install" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, switch/case on the inst.Action, this will also make the code less indented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, that is nicer, thank you!
There is no need to install ubuntu-core any-more with current snapd.
People with existing installs will auto-transition to core on the
next refresh.
Some more background: https://forum.snapcraft.io/t/error-using-obsolete-ubuntu-core-snap-on-classic/525/3
I.e. we will also freeze ubuntu-core as part of this effort so that we don't have to maintain compatibility code in snapd itself that checks for both ubuntu-core and core all the time.
LP: #1689332