commit:     5675f908d614aa5fa7e1b6bb6385df63aa142738
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 28 19:58:17 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 20:00:41 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=5675f908

Call get_KV in genkernel main script only

$KV must be set for determine_config_file. However, for clarity,
call get_KV in main script only and don't rely on other functions.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_determineargs.sh | 2 --
 genkernel            | 7 ++++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index e955540..c88bb4f 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -259,6 +259,4 @@ determine_real_args() {
 
                [[ "${FIRMWARE_FILES}" = *,* ]] && gen_die "FIRMWARE_FILES 
should be a space-separated list."
        fi
-
-       get_KV
 }

diff --git a/genkernel b/genkernel
index 0e716b5..44c34ba 100755
--- a/genkernel
+++ b/genkernel
@@ -139,8 +139,13 @@ done
 
 # Based on genkernel.conf, arch-specific configs, and commandline options,
 # get the real arguments for usage...
-
 determine_real_args
+
+get_KV
+# $KV is now either set to the version from previous compilation,
+# which would include LOCALVERSION suffix, or initialized with
+# unmodified KERNEL_SOURCE version (which normally has no LOCALVERSION set).
+
 determine_config_file
 
 set_kernel_arch

Reply via email to