mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-19 11:21:32 +02:00
coreos-kernel: fix check for unclean source tree and check earlier
This check was broken in when the source symlinks were moved from `${S}` to `${S}/source`. Also, since it is a environment sanity check running the check as early as possible in `pkg_pretend` is appropriate.
This commit is contained in:
parent
05793c7acd
commit
fdf8ea8f8e
@ -175,6 +175,15 @@ prepare-lib-modules-release-dirs() {
|
|||||||
"${D}/usr/lib/modules/${version}" || die
|
"${D}/usr/lib/modules/${version}" || die
|
||||||
}
|
}
|
||||||
|
|
||||||
|
coreos-kernel_pkg_pretend() {
|
||||||
|
[[ "${MERGE_TYPE}" == binary ]] && return
|
||||||
|
|
||||||
|
if [[ -f "${KERNEL_DIR}/.config" || -d "${KERNEL_DIR}/include/config" ]]
|
||||||
|
then
|
||||||
|
die "Source is not clean! Run make mrproper in ${KERNEL_DIR}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
coreos-kernel_src_unpack() {
|
coreos-kernel_src_unpack() {
|
||||||
# we more or less reproduce the layout in /lib/modules/$(uname -r)/
|
# we more or less reproduce the layout in /lib/modules/$(uname -r)/
|
||||||
mkdir -p "${S}/build" || die
|
mkdir -p "${S}/build" || die
|
||||||
@ -183,11 +192,6 @@ coreos-kernel_src_unpack() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
coreos-kernel_src_prepare() {
|
coreos-kernel_src_prepare() {
|
||||||
if [[ -f ".config" || -d "include/config" ]]
|
|
||||||
then
|
|
||||||
die "Source is not clean! Run make mrproper in ${KERNEL_DIR}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
restore_config build/.config
|
restore_config build/.config
|
||||||
if [[ ! -f build/.config ]]; then
|
if [[ ! -f build/.config ]]; then
|
||||||
local config="$(find_defconfig)"
|
local config="$(find_defconfig)"
|
||||||
@ -275,4 +279,4 @@ coreos-kernel_pkg_setup() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_setup
|
EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user