mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 17:31:38 +00:00
snap-tool: prefer 'stable' channel over 'stable/ubuntu-X.X' for core snaps
When the "snap-tool" script encounters a core snap it will switch to the "stable" channel if the channel was set to "stable/ubuntu-X.X". This ensures that core snaps always come from one canonical source.
This commit is contained in:
parent
1f5c21fd12
commit
ee4fc93b06
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
|||||||
|
livecd-rootfs (2.573) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* When the "snap-tool" script encounters a core snap it will switch to
|
||||||
|
the "stable" channel if the channel was set to "stable/ubuntu-X.X". This
|
||||||
|
ensures that core snaps always come from one canonical source.
|
||||||
|
|
||||||
|
-- Tobias Koch <tobias.koch@canonical.com> Wed, 20 Mar 2019 14:33:34 +0100
|
||||||
|
|
||||||
livecd-rootfs (2.572) disco; urgency=medium
|
livecd-rootfs (2.572) disco; urgency=medium
|
||||||
|
|
||||||
* Revert "subiquity: fix name of mdoules.squashfs to mount", debian-cd
|
* Revert "subiquity: fix name of mdoules.squashfs to mount", debian-cd
|
||||||
|
@ -24,6 +24,7 @@ import getopt
|
|||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@ -150,6 +151,14 @@ class Snap:
|
|||||||
if self._details and not cohort_create:
|
if self._details and not cohort_create:
|
||||||
return self._details
|
return self._details
|
||||||
|
|
||||||
|
if re.match(r"^core\d*$", self._name) and \
|
||||||
|
self._channel.startswith("stable/ubuntu-"):
|
||||||
|
sys.stderr.write(
|
||||||
|
"WARNING: switching channel from '{}' to 'stable' for '{}' "
|
||||||
|
"snap.\n".format(self._channel, self._name)
|
||||||
|
)
|
||||||
|
self._channel = "stable"
|
||||||
|
|
||||||
path = "/v2/snaps/refresh"
|
path = "/v2/snaps/refresh"
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user