Skip to content

Commit 0decc79

Browse files
committed
kpatch-build: introduce ability to ignore distro-specific checks
Ignore distro-specific checks if kernel source directory is supplied as a command line argument to remove the distro-specific tunings during cross-compilation. Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> Signed-off-by: Oleh Matiusha <oleh.matiusha@globallogic.com>
1 parent fd0457b commit 0decc79

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kpatch-build/kpatch-build

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,11 @@ fi
705705

706706
# Don't check external file.
707707
# shellcheck disable=SC1090
708-
[[ -f "$RELEASE_FILE" ]] && source "$RELEASE_FILE"
709-
DISTRO="$ID"
708+
if [[ -z "$USERSRCDIR" ]] && [[ -f "$RELEASE_FILE" ]]; then
709+
source "$RELEASE_FILE"
710+
DISTRO="$ID"
711+
fi
712+
710713
if [[ "$DISTRO" = fedora ]] || [[ "$DISTRO" = rhel ]] || [[ "$DISTRO" = ol ]] || [[ "$DISTRO" = centos ]] || [[ "$DISTRO" = openEuler ]]; then
711714
[[ -z "$VMLINUX" ]] && VMLINUX="/usr/lib/debug/lib/modules/$ARCHVERSION/vmlinux"
712715
[[ -e "$VMLINUX" ]] || die "kernel-debuginfo-$ARCHVERSION not installed"

0 commit comments

Comments
 (0)