Skip to content

Commit

Permalink
plugins: initrd: do not copy os-release to the chroot
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Kubik <[email protected]>
  • Loading branch information
kubiko committed Jan 16, 2025
1 parent 9eb551f commit 6ea70b7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions snapcraft_legacy/plugins/v2/_initrd_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,6 @@ def _setup_initrd_chroot_fnc_cmd() -> List[str]:
rm -rf ${UC_INITRD_ROOT}/usr/lib/modules/*/build
touch "${work_dir}/.${UC_INITRD_ROOT_NAME}.modules"
fi
if [ ! -e "${work_dir}/.${UC_INITRD_ROOT_NAME}.os-release" ]; then
cp "/snap/${UBUNTU_CORE_BASE}/current/etc/os-release" "${UC_INITRD_ROOT}/etc/os-release"
touch "${work_dir}/.${UC_INITRD_ROOT_NAME}.os-release"
fi
set -x
}
"""
Expand Down
5 changes: 0 additions & 5 deletions tests/legacy/unit/plugins/v2/test_initrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,11 +738,6 @@ def _is_sub_array(array, sub_array):
rm -rf ${UC_INITRD_ROOT}/usr/lib/modules/*/build
touch "${work_dir}/.${UC_INITRD_ROOT_NAME}.modules"
fi
if [ ! -e "${work_dir}/.${UC_INITRD_ROOT_NAME}.os-release" ]; then
cp "/snap/${UBUNTU_CORE_BASE}/current/etc/os-release" "${UC_INITRD_ROOT}/etc/os-release"
touch "${work_dir}/.${UC_INITRD_ROOT_NAME}.os-release"
fi
set -x
}
"""
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/parts/plugins/test_initrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,11 +857,6 @@ def _is_sub_array(array, sub_array):
rm -rf ${UC_INITRD_ROOT}/usr/lib/modules/*/build
touch "${work_dir}/.${UC_INITRD_ROOT_NAME}.modules"
fi
if [ ! -e "${work_dir}/.${UC_INITRD_ROOT_NAME}.os-release" ]; then
cp "/snap/${UBUNTU_CORE_BASE}/current/etc/os-release" "${UC_INITRD_ROOT}/etc/os-release"
touch "${work_dir}/.${UC_INITRD_ROOT_NAME}.os-release"
fi
set -x
}
"""
Expand Down

0 comments on commit 6ea70b7

Please sign in to comment.