mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 12:16:41 +02:00
build_image_util: do not symlink etc/portage/profile
Create profile as a real directory instead of a symlink to the board root's configuration. Normally the board root does not modify this but it is useful for build_image to use it to modify package.provided.
This commit is contained in:
parent
a1d3a95381
commit
8a3a5e1c51
@ -145,10 +145,23 @@ write_contents() {
|
||||
# Generate a list of installed packages in the format:
|
||||
# sys-apps/systemd-212-r8::coreos
|
||||
write_packages() {
|
||||
local profile="${BUILD_DIR}/configroot/etc/portage/profile"
|
||||
info "Writing ${2##*/}"
|
||||
ROOT="$1" equery-$BOARD --no-color \
|
||||
list '*' --format '$cpv::$repo' \
|
||||
> "$2"
|
||||
if [[ -f "${profile}/package.provided" ]]; then
|
||||
cat "${profile}/package.provided" >> "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
# Add an entry to the image's package.provided
|
||||
package_provided() {
|
||||
local p profile="${BUILD_DIR}/configroot/etc/portage/profile"
|
||||
for p in "$@"; do
|
||||
info "Writing $p to package.provided"
|
||||
echo "$p" >> "${profile}/package.provided"
|
||||
done
|
||||
}
|
||||
|
||||
start_image() {
|
||||
@ -159,8 +172,10 @@ start_image() {
|
||||
|
||||
local disk_img="${BUILD_DIR}/${image_name}"
|
||||
|
||||
mkdir -p "${BUILD_DIR}"/configroot/etc/portage
|
||||
ln -s "${BOARD_ROOT}"/etc/portage/* \
|
||||
mkdir -p "${BUILD_DIR}"/configroot/etc/portage/profile
|
||||
ln -s "${BOARD_ROOT}"/etc/portage/make.* \
|
||||
"${BOARD_ROOT}"/etc/portage/package.* \
|
||||
"${BOARD_ROOT}"/etc/portage/repos.conf \
|
||||
"${BUILD_DIR}"/configroot/etc/portage/
|
||||
|
||||
info "Using image type ${disk_layout}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user