1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
diff --git a/craft_providers/base.py b/craft_providers/base.py
index 3c914a2..d9c2cf9 100644
--- a/craft_providers/base.py
+++ b/craft_providers/base.py
@@ -655,37 +655,22 @@ class Base(ABC):
),
)
- if snap.channel:
- try:
- snap_installer.install_from_store(
- executor=executor,
- snap_name=snap.name,
- channel=snap.channel,
- classic=snap.classic,
- )
- except SnapInstallationError as error:
- raise BaseConfigurationError(
- brief=(
- f"failed to install snap {snap.name!r} from store"
- f" channel {snap.channel!r} in target environment."
- ),
- details=error.details,
- ) from error
- else:
- try:
- snap_installer.inject_from_host(
- executor=executor,
- snap_name=snap.name,
- classic=snap.classic,
- )
- except SnapInstallationError as error:
- raise BaseConfigurationError(
- brief=(
- f"failed to inject host's snap {snap.name!r} "
- "into target environment."
- ),
- details=error.details,
- ) from error
+ try:
+ channel = "latest/edge" if snap.name == "rockcraft" else "latest/stable"
+ snap_installer.install_from_store(
+ executor=executor,
+ snap_name=snap.name,
+ channel=channel,
+ classic=snap.classic,
+ )
+ except SnapInstallationError as error:
+ raise BaseConfigurationError(
+ brief=(
+ f"failed to install snap {snap.name!r} from store"
+ f" channel {channel!r} in target environment."
+ ),
+ details=error.details,
+ ) from error
def wait_until_ready(self, executor: Executor) -> None:
"""Wait until base instance is ready.
|