diff --git a/extensions/desktop/common/desktop-exports b/extensions/desktop/common/desktop-exports index f950085681..d76cf68ec9 100644 --- a/extensions/desktop/common/desktop-exports +++ b/extensions/desktop/common/desktop-exports @@ -467,3 +467,6 @@ ln -sfn "$REALHOME/.config/ibus/bus" "$IBUS_CONFIG_PATH" # Set libgweather path export LIBGWEATHER_LOCATIONS_PATH="$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/libgweather-4/Locations.bin" + +# Set libthai dict path +export LIBTHAI_DICTDIR="$SNAP_DESKTOP_RUNTIME/usr/share/libthai/" diff --git a/snapcraft/parts/plugins/_ros.py b/snapcraft/parts/plugins/_ros.py index b993d1fd4b..c4891128ef 100644 --- a/snapcraft/parts/plugins/_ros.py +++ b/snapcraft/parts/plugins/_ros.py @@ -177,8 +177,11 @@ def get_build_commands(self) -> List[str]: return ( self._get_workspace_activation_commands() + [ - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; " - "then sudo rosdep init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + # Preserve http(s)_proxy env var in root for remote-build proxy since rosdep + # doesn't support proxy + # https://github.com/ros-infrastructure/rosdep/issues/271 + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', "rosdep install --default-yes --ignore-packages-from-source " '--from-paths "${CRAFT_PART_SRC_WORK}"', diff --git a/snapcraft/parts/plugins/kernel_plugin.py b/snapcraft/parts/plugins/kernel_plugin.py index a751c890b1..a158d2784a 100644 --- a/snapcraft/parts/plugins/kernel_plugin.py +++ b/snapcraft/parts/plugins/kernel_plugin.py @@ -385,6 +385,7 @@ def get_build_packages(self) -> Set[str]: build_packages = { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -447,7 +448,6 @@ def get_build_environment(self) -> Dict[str, str]: "ARCH": self._kernel_arch, "DEB_ARCH": "${CRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${CRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${CRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": f"${{CRAFT_PART_BUILD}}/arch/{self._kernel_arch}/boot", "KERNEL_IMAGE_TARGET": self.kernel_image_target, } diff --git a/snapcraft_legacy/plugins/v2/_kernel_build.py b/snapcraft_legacy/plugins/v2/_kernel_build.py index 5179090646..38cb062f1e 100644 --- a/snapcraft_legacy/plugins/v2/_kernel_build.py +++ b/snapcraft_legacy/plugins/v2/_kernel_build.py @@ -211,8 +211,8 @@ def _download_snap_bootstrap_cmd(target_arch: str) -> List[str]: echo "Getting snapd deb for snap bootstrap..." # only download again if files does not exist, otherwise # assume we are re-running build - if [ ! -e ${{SNAPD_UNPACKED_SNAP}} ]; then - download_snap_bootstrap {arch} ${{SNAPD_UNPACKED_SNAP}} + if [ ! -e ${{UC_INITRD_DEB}}/usr/lib/snapd ]; then + download_snap_bootstrap {arch} ${{UC_INITRD_DEB}} fi """.format( arch=target_arch @@ -709,7 +709,7 @@ def _make_initrd_cmd( " ".join( [ "link_files", - '"${SNAPD_UNPACKED_SNAP}"', + '"${UC_INITRD_DEB}"', '"usr/lib/snapd/snap-bootstrap"', '"${uc_initrd_feature_snap_bootstratp}"', ] @@ -717,7 +717,7 @@ def _make_initrd_cmd( " ".join( [ "link_files", - '"${SNAPD_UNPACKED_SNAP}"', + '"${UC_INITRD_DEB}"', '"usr/lib/snapd/info"', '"${uc_initrd_feature_snap_bootstratp}"', ] @@ -725,7 +725,7 @@ def _make_initrd_cmd( " ".join( [ "cp", - "${SNAPD_UNPACKED_SNAP}/usr/lib/snapd/info", + "${UC_INITRD_DEB}/usr/lib/snapd/info", f"{install_dir}/snapd-info", ] ), diff --git a/snapcraft_legacy/plugins/v2/_ros.py b/snapcraft_legacy/plugins/v2/_ros.py index fc9d6d5aa9..393196a458 100644 --- a/snapcraft_legacy/plugins/v2/_ros.py +++ b/snapcraft_legacy/plugins/v2/_ros.py @@ -163,7 +163,11 @@ def get_build_commands(self) -> List[str]: return ( self._get_workspace_activation_commands() + [ - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + # Preserve http(s)_proxy env var in root for remote-build proxy since rosdep + # doesn't support proxy + # https://github.com/ros-infrastructure/rosdep/issues/271 + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', 'rosdep install --default-yes --ignore-packages-from-source --from-paths "${SNAPCRAFT_PART_SRC_WORK}"', ] diff --git a/snapcraft_legacy/plugins/v2/kernel.py b/snapcraft_legacy/plugins/v2/kernel.py index 1ece2957d1..af29bd0fd2 100644 --- a/snapcraft_legacy/plugins/v2/kernel.py +++ b/snapcraft_legacy/plugins/v2/kernel.py @@ -430,6 +430,7 @@ def get_build_packages(self) -> Set[str]: build_packages = { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -490,7 +491,6 @@ def get_build_environment(self) -> Dict[str, str]: "ARCH": self._kernel_arch, "DEB_ARCH": "${SNAPCRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${SNAPCRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${SNAPCRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": f"${{SNAPCRAFT_PART_BUILD}}/arch/{self._kernel_arch}/boot", "KERNEL_IMAGE_TARGET": self.kernel_image_target, } diff --git a/tests/legacy/unit/plugins/v2/test_catkin.py b/tests/legacy/unit/plugins/v2/test_catkin.py index 95d3a8a8ba..df99d97d77 100644 --- a/tests/legacy/unit/plugins/v2/test_catkin.py +++ b/tests/legacy/unit/plugins/v2/test_catkin.py @@ -95,8 +95,8 @@ class Options: "fi", '. /opt/ros/"${ROS_DISTRO}"/setup.sh', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', 'rosdep install --default-yes --ignore-packages-from-source --from-paths "${SNAPCRAFT_PART_SRC_WORK}"', 'state="$(set +o); set -$-"', @@ -159,8 +159,8 @@ class Options: "fi", '. /opt/ros/"${ROS_DISTRO}"/setup.sh', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', 'rosdep install --default-yes --ignore-packages-from-source --from-paths "${SNAPCRAFT_PART_SRC_WORK}"', 'state="$(set +o); set -$-"', diff --git a/tests/legacy/unit/plugins/v2/test_catkin_tools.py b/tests/legacy/unit/plugins/v2/test_catkin_tools.py index a9e9a018ec..fc1c7905af 100644 --- a/tests/legacy/unit/plugins/v2/test_catkin_tools.py +++ b/tests/legacy/unit/plugins/v2/test_catkin_tools.py @@ -90,8 +90,8 @@ class Options: "fi", '. /opt/ros/"${ROS_DISTRO}"/setup.sh', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', 'rosdep install --default-yes --ignore-packages-from-source --from-paths "${SNAPCRAFT_PART_SRC_WORK}"', 'state="$(set +o); set -$-"', @@ -155,8 +155,8 @@ class Options: "fi", '. /opt/ros/"${ROS_DISTRO}"/setup.sh', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', 'rosdep install --default-yes --ignore-packages-from-source --from-paths "${SNAPCRAFT_PART_SRC_WORK}"', 'state="$(set +o); set -$-"', diff --git a/tests/legacy/unit/plugins/v2/test_colcon.py b/tests/legacy/unit/plugins/v2/test_colcon.py index b7f807d382..9821d9817e 100644 --- a/tests/legacy/unit/plugins/v2/test_colcon.py +++ b/tests/legacy/unit/plugins/v2/test_colcon.py @@ -115,8 +115,8 @@ class Options: "fi", '. /opt/ros/"${ROS_DISTRO}"/local_setup.sh', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', 'rosdep install --default-yes --ignore-packages-from-source --from-paths "${SNAPCRAFT_PART_SRC_WORK}"', 'state="$(set +o); set -$-"', @@ -182,8 +182,8 @@ class Options: "fi", '. /opt/ros/"${ROS_DISTRO}"/local_setup.sh', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', 'rosdep install --default-yes --ignore-packages-from-source --from-paths "${SNAPCRAFT_PART_SRC_WORK}"', 'state="$(set +o); set -$-"', diff --git a/tests/legacy/unit/plugins/v2/test_kernel.py b/tests/legacy/unit/plugins/v2/test_kernel.py index 1bc95d9eeb..81dd38910f 100644 --- a/tests/legacy/unit/plugins/v2/test_kernel.py +++ b/tests/legacy/unit/plugins/v2/test_kernel.py @@ -266,6 +266,7 @@ def test_get_base_build_packages(self): { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -285,6 +286,7 @@ def test_get_base_build_packages_lz4(self): { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -304,6 +306,7 @@ def test_get_base_build_packages_xz(self): { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -323,6 +326,7 @@ def test_get_base_build_packages_zfs(self): { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -347,6 +351,7 @@ def test_get_base_build_packages_zfs_cross(self): { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -503,7 +508,6 @@ def test_check_get_build_environment(self): "ARCH": plugin._kernel_arch, "DEB_ARCH": "${SNAPCRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${SNAPCRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${SNAPCRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": f"${{SNAPCRAFT_PART_BUILD}}/arch/{plugin._kernel_arch}/boot", "KERNEL_IMAGE_TARGET": plugin.kernel_image_target, }, @@ -524,7 +528,6 @@ def test_check_get_build_environment_compiler_paths_cross(self): "ARCH": "arm", "DEB_ARCH": "${SNAPCRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${SNAPCRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${SNAPCRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": "${SNAPCRAFT_PART_BUILD}/arch/arm/boot", "KERNEL_IMAGE_TARGET": "Image.gz", "PATH": "${SNAPCRAFT_STAGE}/gcc-11/bin:${PATH}", @@ -544,7 +547,6 @@ def test_check_get_build_environment_compiler_paths(self): "ARCH": plugin._kernel_arch, "DEB_ARCH": "${SNAPCRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${SNAPCRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${SNAPCRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": f"${{SNAPCRAFT_PART_BUILD}}/arch/{plugin._kernel_arch}/boot", "KERNEL_IMAGE_TARGET": plugin.kernel_image_target, "PATH": "${SNAPCRAFT_STAGE}/gcc-11/bin:${SNAPCRAFT_STAGE}/gcc-11/sbin:${PATH}", @@ -1005,6 +1007,7 @@ def test_use_llvm(self): { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -1037,6 +1040,7 @@ def test_use_llvm_specific_version(self): { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -1237,8 +1241,8 @@ def _is_sub_array(array, sub_array): echo "Getting snapd deb for snap bootstrap..." # only download again if files does not exist, otherwise # assume we are re-running build - if [ ! -e ${{SNAPD_UNPACKED_SNAP}} ]; then - download_snap_bootstrap {arch} ${{SNAPD_UNPACKED_SNAP}} + if [ ! -e ${{UC_INITRD_DEB}}/usr/lib/snapd ]; then + download_snap_bootstrap {arch} ${{UC_INITRD_DEB}} fi """.format( arch=_DEB_ARCH_TRANSLATIONS[platform.machine()] @@ -1252,8 +1256,8 @@ def _is_sub_array(array, sub_array): echo "Getting snapd deb for snap bootstrap..." # only download again if files does not exist, otherwise # assume we are re-running build - if [ ! -e ${{SNAPD_UNPACKED_SNAP}} ]; then - download_snap_bootstrap {arch} ${{SNAPD_UNPACKED_SNAP}} + if [ ! -e ${{UC_INITRD_DEB}}/usr/lib/snapd ]; then + download_snap_bootstrap {arch} ${{UC_INITRD_DEB}} fi """.format( arch="armhf" @@ -1662,12 +1666,12 @@ def _is_sub_array(array, sub_array): " ".join( [ "link_files", - '"${SNAPD_UNPACKED_SNAP}" "usr/lib/snapd/snap-bootstrap"', + '"${UC_INITRD_DEB}" "usr/lib/snapd/snap-bootstrap"', '"${uc_initrd_feature_snap_bootstratp}"', ], ), - 'link_files "${SNAPD_UNPACKED_SNAP}" "usr/lib/snapd/info" "${uc_initrd_feature_snap_bootstratp}"', - "cp ${SNAPD_UNPACKED_SNAP}/usr/lib/snapd/info ${SNAPCRAFT_PART_INSTALL}/snapd-info", + 'link_files "${UC_INITRD_DEB}" "usr/lib/snapd/info" "${uc_initrd_feature_snap_bootstratp}"', + "cp ${UC_INITRD_DEB}/usr/lib/snapd/info ${SNAPCRAFT_PART_INSTALL}/snapd-info", ] _clean_old_initrd_cmd = [ diff --git a/tests/unit/parts/plugins/test_colcon.py b/tests/unit/parts/plugins/test_colcon.py index b143ca3668..a37c025dc4 100644 --- a/tests/unit/parts/plugins/test_colcon.py +++ b/tests/unit/parts/plugins/test_colcon.py @@ -139,8 +139,8 @@ def test_get_build_commands(self, setup_method_fixture, new_dir, monkeypatch): "fi", '. "/opt/ros/${ROS_DISTRO}/local_setup.sh"', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', "rosdep install --default-yes --ignore-packages-from-source " '--from-paths "${CRAFT_PART_SRC_WORK}"', @@ -218,8 +218,8 @@ def test_get_build_commands_with_all_properties( "fi", '. "/opt/ros/${ROS_DISTRO}/local_setup.sh"', 'eval "${state}"', - "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep " - "init; fi", + "if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then", + "sudo --preserve-env=http_proxy,https_proxy rosdep init; fi", 'rosdep update --include-eol-distros --rosdistro "${ROS_DISTRO}"', "rosdep install --default-yes --ignore-packages-from-source " '--from-paths "${CRAFT_PART_SRC_WORK}"', diff --git a/tests/unit/parts/plugins/test_kernel.py b/tests/unit/parts/plugins/test_kernel.py index 4fcfcee6ee..db708ba3d8 100644 --- a/tests/unit/parts/plugins/test_kernel.py +++ b/tests/unit/parts/plugins/test_kernel.py @@ -71,6 +71,7 @@ def test_get_base_build_packages(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -92,6 +93,7 @@ def test_get_base_build_packages_lz4(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -113,6 +115,7 @@ def test_get_base_build_packages_xz(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -134,6 +137,7 @@ def test_get_base_build_packages_zfs(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -161,6 +165,7 @@ def test_get_base_build_packages_zfs_cross(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -188,6 +193,7 @@ def test_get_base_build_packages_efi(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -382,7 +388,6 @@ def test_check_get_build_environment(self, setup_method_fixture, new_dir): "ARCH": plugin._kernel_arch, "DEB_ARCH": "${CRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${CRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${CRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": f"${{CRAFT_PART_BUILD}}/arch/{plugin._kernel_arch}/boot", "KERNEL_IMAGE_TARGET": plugin.kernel_image_target, } @@ -404,7 +409,6 @@ def test_check_get_build_environment_compiler_paths_cross( "ARCH": "arm", "DEB_ARCH": "${CRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${CRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${CRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": "${CRAFT_PART_BUILD}/arch/arm/boot", "KERNEL_IMAGE_TARGET": "Image.gz", "PATH": "${CRAFT_STAGE}/gcc-11/bin:${PATH}", @@ -426,7 +430,6 @@ def test_check_get_build_environment_compiler_paths( "ARCH": plugin._kernel_arch, "DEB_ARCH": "${CRAFT_TARGET_ARCH}", "UC_INITRD_DEB": "${CRAFT_PART_BUILD}/ubuntu-core-initramfs", - "SNAPD_UNPACKED_SNAP": "${CRAFT_PART_BUILD}/unpacked_snapd", "KERNEL_BUILD_ARCH_DIR": f"${{CRAFT_PART_BUILD}}/arch/{plugin._kernel_arch}/boot", "KERNEL_IMAGE_TARGET": plugin.kernel_image_target, "PATH": "${CRAFT_STAGE}/gcc-11/bin:${CRAFT_STAGE}/gcc-11/sbin:${PATH}", @@ -1097,6 +1100,7 @@ def test_use_llvm(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -1131,6 +1135,7 @@ def test_use_llvm_specific_version(self, setup_method_fixture, new_dir): assert plugin.get_build_packages() == { "bc", "binutils", + "debhelper", "fakeroot", "gcc", "cmake", @@ -1340,8 +1345,8 @@ def _is_sub_array(array, sub_array): echo "Getting snapd deb for snap bootstrap..." # only download again if files does not exist, otherwise # assume we are re-running build - if [ ! -e ${{SNAPD_UNPACKED_SNAP}} ]; then - download_snap_bootstrap {_machine_arch} ${{SNAPD_UNPACKED_SNAP}} + if [ ! -e ${{UC_INITRD_DEB}}/usr/lib/snapd ]; then + download_snap_bootstrap {_machine_arch} ${{UC_INITRD_DEB}} fi """ ) @@ -1353,8 +1358,8 @@ def _is_sub_array(array, sub_array): echo "Getting snapd deb for snap bootstrap..." # only download again if files does not exist, otherwise # assume we are re-running build - if [ ! -e ${SNAPD_UNPACKED_SNAP} ]; then - download_snap_bootstrap armhf ${SNAPD_UNPACKED_SNAP} + if [ ! -e ${UC_INITRD_DEB}/usr/lib/snapd ]; then + download_snap_bootstrap armhf ${UC_INITRD_DEB} fi """ ) @@ -1772,13 +1777,13 @@ def _is_sub_array(array, sub_array): " ".join( [ "link_files", - '"${SNAPD_UNPACKED_SNAP}" "usr/lib/snapd/snap-bootstrap"', + '"${UC_INITRD_DEB}" "usr/lib/snapd/snap-bootstrap"', '"${uc_initrd_feature_snap_bootstratp}"', ], ), - 'link_files "${SNAPD_UNPACKED_SNAP}" "usr/lib/snapd/info"' + 'link_files "${UC_INITRD_DEB}" "usr/lib/snapd/info"' ' "${uc_initrd_feature_snap_bootstratp}"', - "cp ${SNAPD_UNPACKED_SNAP}/usr/lib/snapd/info ${CRAFT_PART_INSTALL}/snapd-info", + "cp ${UC_INITRD_DEB}/usr/lib/snapd/info ${CRAFT_PART_INSTALL}/snapd-info", ] _clean_old_initrd_cmd = [