diff --git a/rockcraft/pebble.py b/rockcraft/pebble.py index 38ce7cdf2..0e1080696 100644 --- a/rockcraft/pebble.py +++ b/rockcraft/pebble.py @@ -26,8 +26,6 @@ from craft_application.errors import CraftValidationError from craft_cli import emit -from rockcraft.constants import ROCK_CONTROL_DIR - def _alias_generator(name: str) -> str: """Convert underscores to dashes in aliases.""" @@ -168,7 +166,7 @@ class Pebble: PEBBLE_PATH = "var/lib/pebble/default" PEBBLE_LAYERS_PATH = f"{PEBBLE_PATH}/layers" - PEBBLE_BINARY_DIR = f"{ROCK_CONTROL_DIR}/bin" + PEBBLE_BINARY_DIR = "usr/bin" PEBBLE_BINARY_PATH = f"{PEBBLE_BINARY_DIR}/pebble" PEBBLE_BINARY_PATH_PREVIOUS = "bin/pebble" _BASE_PART_SPEC = { diff --git a/tests/spread/rockcraft/base-devel/task.yaml b/tests/spread/rockcraft/base-devel/task.yaml index a3fcc7b48..3418635a0 100644 --- a/tests/spread/rockcraft/base-devel/task.yaml +++ b/tests/spread/rockcraft/base-devel/task.yaml @@ -30,8 +30,9 @@ execute: | docker-daemon:base-devel:0.1 rm base-devel_0.1_amd64.rock docker images base-devel:0.1 - id=$(docker run --rm -d base-devel:0.1) - test "$(docker inspect "$id" -f '{{json .Config.Entrypoint}}')" = '["/.rock/bin/pebble","enter"]' + id=$(docker run -d base-devel:0.1) + test "$(docker inspect "$id" -f '{{json .Config.Entrypoint}}')" = '["/usr/bin/pebble","enter"]' + docker exec "$id" pebble services docker rm -f "$id" restore: | diff --git a/tests/unit/test_application.py b/tests/unit/test_application.py index 99915343f..799db803a 100644 --- a/tests/unit/test_application.py +++ b/tests/unit/test_application.py @@ -63,7 +63,7 @@ def test_application_expand_environment(new_dir, default_application): @pytest.mark.parametrize( ("base", "build_base", "expected_spec"), [ - # 24.04 and beyond: pebble exists in .rock/bin/ + # 24.04 and beyond: pebble exists in usr/bin/ ("bare", "devel", Pebble.PEBBLE_PART_SPEC), ("ubuntu@24.04", "devel", Pebble.PEBBLE_PART_SPEC), # 20.04 and 22.04: pebble exists in bin/ diff --git a/tests/unit/test_pebble.py b/tests/unit/test_pebble.py index 2dd7454ad..473c9ed44 100644 --- a/tests/unit/test_pebble.py +++ b/tests/unit/test_pebble.py @@ -33,7 +33,7 @@ class TestPebble: def test_attributes(self): assert Pebble.PEBBLE_PATH == "var/lib/pebble/default" assert Pebble.PEBBLE_LAYERS_PATH == "var/lib/pebble/default/layers" - assert Pebble.PEBBLE_BINARY_PATH == ".rock/bin/pebble" + assert Pebble.PEBBLE_BINARY_PATH == "usr/bin/pebble" assert Pebble.PEBBLE_BINARY_PATH_PREVIOUS == "bin/pebble" assert all( field in Pebble.PEBBLE_PART_SPEC