mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 22:16:58 +02:00
build_image_util: Fix warnings when building OEM ACIs
INFO build_oem_aci: Writing coreos_oem_gce_aci_stage_packages.txt awk: cmd. line:1: fatal: cannot open file `/build/amd64-usr/var/db/pkg//DEPEND' for reading (No such file or directory) INFO build_oem_aci: Writing coreos_oem_gce_aci_stage_licenses.txt awk: cmd. line:1: fatal: cannot open file `/build/amd64-usr/var/db/pkg//DEPEND' for reading (No such file or directory)
This commit is contained in:
parent
66dca6ab85
commit
d8fb403f69
@ -220,6 +220,7 @@ image_packages() {
|
|||||||
local profile="${BUILD_DIR}/configroot/etc/portage/profile"
|
local profile="${BUILD_DIR}/configroot/etc/portage/profile"
|
||||||
ROOT="$1" PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \
|
ROOT="$1" PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \
|
||||||
equery --no-color list --format '$cpv::$repo' '*'
|
equery --no-color list --format '$cpv::$repo' '*'
|
||||||
|
|
||||||
# We also want to list packages that only exist in the initramfs.
|
# We also want to list packages that only exist in the initramfs.
|
||||||
# Approximate this by listing build dependencies of coreos-kernel that
|
# Approximate this by listing build dependencies of coreos-kernel that
|
||||||
# are specified with the "=" slot operator, excluding those already
|
# are specified with the "=" slot operator, excluding those already
|
||||||
@ -227,14 +228,18 @@ image_packages() {
|
|||||||
local vdb=$(portageq-${BOARD} vdb_path)
|
local vdb=$(portageq-${BOARD} vdb_path)
|
||||||
local kernel_pkg=$(ROOT="$1" PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \
|
local kernel_pkg=$(ROOT="$1" PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \
|
||||||
equery --no-color list --format '$cpv' sys-kernel/coreos-kernel)
|
equery --no-color list --format '$cpv' sys-kernel/coreos-kernel)
|
||||||
local depend_path="$vdb/$kernel_pkg/DEPEND"
|
# OEM ACIs have no kernel package.
|
||||||
local pkg
|
if [[ -n "${kernel_pkg}" ]]; then
|
||||||
for pkg in $(awk 'BEGIN {RS=" "} /=$/ {print}' "$depend_path"); do
|
local depend_path="$vdb/$kernel_pkg/DEPEND"
|
||||||
if ! ROOT="$1" PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \
|
local pkg
|
||||||
equery -q list "$pkg" >/dev/null ; then
|
for pkg in $(awk 'BEGIN {RS=" "} /=$/ {print}' "$depend_path"); do
|
||||||
equery-${BOARD} --no-color list --format '$cpv::$repo' "$pkg"
|
if ! ROOT="$1" PORTAGE_CONFIGROOT="${BUILD_DIR}"/configroot \
|
||||||
fi
|
equery -q list "$pkg" >/dev/null ; then
|
||||||
done
|
equery-${BOARD} --no-color list --format '$cpv::$repo' "$pkg"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# In production images GCC libraries are extracted manually.
|
# In production images GCC libraries are extracted manually.
|
||||||
if [[ -f "${profile}/package.provided" ]]; then
|
if [[ -f "${profile}/package.provided" ]]; then
|
||||||
xargs --arg-file="${profile}/package.provided" \
|
xargs --arg-file="${profile}/package.provided" \
|
||||||
|
Loading…
Reference in New Issue
Block a user