Skip to content

Commit 8f02d3d

Browse files
authored
fix: remove unnecessary snapd_snap flag (#5689)
Fixes #5316
1 parent 2d1b4ed commit 8f02d3d

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

snapcraft_legacy/internal/build_providers/_snap.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,6 @@ def _disable_and_wait_for_refreshes(self) -> None:
345345
logger.debug("Waiting for pending snap auto refreshes.")
346346
self._runner(["snap", "watch", "--last=auto-refresh?"], hide_output=True)
347347

348-
def _enable_snapd_snap(self) -> None:
349-
# Required to not install the core snap when building using
350-
# other bases.
351-
logger.debug("Enable use of snapd snap.")
352-
self._runner(
353-
["snap", "set", "system", "experimental.snapd-snap=true"], hide_output=True
354-
)
355-
356348
def _get_latest_revision(self, snap_name) -> Optional[str]:
357349
try:
358350
return self._registry_data[snap_name][-1]["revision"]
@@ -381,10 +373,6 @@ def apply(self) -> None:
381373
if all((s.get_op() == _SnapOp.NOP for s in self._snaps)):
382374
return
383375

384-
# Allow using snapd from the snapd snap to leverage newer snapd features.
385-
if any(s.snap_instance_name == "snapd" for s in self._snaps):
386-
self._enable_snapd_snap()
387-
388376
# Disable refreshes so they do not interfere with installation ops.
389377
self._disable_and_wait_for_refreshes()
390378

tests/legacy/unit/build_providers/test_snap.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ def test_snapcraft_installed_on_host_from_store(self):
123123
self.get_assertion_mock.assert_has_calls(get_assertion_calls)
124124
self.provider.run_mock.assert_has_calls(
125125
[
126-
call(["snap", "set", "system", "experimental.snapd-snap=true"]),
127126
call(["snap", "set", "system", ANY]),
128127
call(["snap", "watch", "--last=auto-refresh?"]),
129128
call(["snap", "ack", "/var/tmp/snapd.assert"]),
@@ -241,7 +240,6 @@ def test_snapcraft_installed_on_host_aliased_from_store(self):
241240
self.get_assertion_mock.assert_has_calls(get_assertion_calls)
242241
self.provider.run_mock.assert_has_calls(
243242
[
244-
call(["snap", "set", "system", "experimental.snapd-snap=true"]),
245243
call(["snap", "set", "system", ANY]),
246244
call(["snap", "watch", "--last=auto-refresh?"]),
247245
call(["snap", "ack", "/var/tmp/snapd.assert"]),

0 commit comments

Comments
 (0)