github: Fix and simplify kernel-apply-patch.sh regarding hv-daemons

This action is kicked off from main for all channels, but the script is
run against each branch, so we can assume that hv-daemons is there.

COREOS_SOURCE_REVISION isn't in the hv-daemons ebuild, but that doesn't
matter. sed will do nothing.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
James Le Cuirot 2025-12-22 10:09:50 +00:00 committed by Mathieu Tortuyaux
parent 8c7973e7a9
commit 1aed8790cf
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8

View File

@ -28,23 +28,15 @@ fi
extra_pkgs=(
sys-kernel/coreos-modules
sys-kernel/coreos-kernel
app-emulation/hv-daemons
)
for pkg in sources modules kernel; do
pushd "sys-kernel/coreos-${pkg}"
git mv "coreos-${pkg}"-*.ebuild "coreos-${pkg}-${VERSION_NEW}.ebuild"
sed -i -e '/^COREOS_SOURCE_REVISION=/s/=.*/=""/' "coreos-${pkg}-${VERSION_NEW}.ebuild"
popd
for pkg in sys-kernel/coreos-{sources,modules,kernel} app-emulation/hv-daemons; do
pkg+=/${pkg##*/}
git mv "${pkg}"-*.ebuild "${pkg}-${VERSION_NEW}.ebuild"
sed -i -e '/^COREOS_SOURCE_REVISION=/s/=.*/=""/' "${pkg}-${VERSION_NEW}.ebuild"
done
if [[ -d app-emulation/hv-daemons ]]; then
# Update hyperv daemons ebuild soft-link to reflect new kernel version
find -D exec app-emulation/hv-daemons/ -type l -exec rm '{}' \;
ln --relative -s app-emulation/hv-daemons/hv-daemons-9999.ebuild \
app-emulation/hv-daemons/hv-daemons-${VERSION_NEW}.ebuild
extra_pkgs+=( app-emulation/hv-daemons )
fi
# Leave ebuild repo section of SDK
popd