summaryrefslogtreecommitdiff
path: root/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch')
-rw-r--r--sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch b/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch
new file mode 100644
index 000000000000..a091e4c9facc
--- /dev/null
+++ b/sys-kernel/dracut/files/050-Makefile-fix-VERSION-again.patch
@@ -0,0 +1,34 @@
+From a76aa8e39016a8564adb0f18f93bbf2e15d3243f Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Sun, 8 Mar 2020 05:47:50 +0300
+Subject: [PATCH] Makefile: fix VERSION again
+
+The variable is not undefined anymore after the first assignment, so
+we should check if variable is empty instead.
+---
+ Makefile | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c69e2dfc..02e2c4b5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,13 @@
+ -include dracut-version.sh
+
+ DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
+-DRACUT_MAIN_VERSION ?= $(DRACUT_VERSION)
++ifeq ($(DRACUT_MAIN_VERSION),)
++DRACUT_MAIN_VERSION = $(DRACUT_VERSION)
++endif
+ DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
+-DRACUT_FULL_VERSION ?= $(DRACUT_VERSION)
++ifeq ($(DRACUT_FULL_VERSION),)
++DRACUT_FULL_VERSION = $(DRACUT_VERSION)
++endif
+
+ -include Makefile.inc
+
+--
+2.24.1
+