From: Prarit Bhargava <pra...@redhat.com>

redhat/Makefile: Always set UPSTREAM

When building the dist-srpm target with VERSION_ON_UPSTREAM=0 the
following error is seen:

fatal: bad revision '^'

This occurs because UPSTREAM is used in genlog.sh but is only set if
VERSION_ON_UPSTREAM=1.

Always set UPSTREAM regardless of the value of VERSION_ON_UPSTREAM.

Signed-off-by: Prarit Bhargava <pra...@redhat.com>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -154,10 +154,12 @@ ifndef VERSION_ON_UPSTREAM
     VERSION_ON_UPSTREAM:=0
   endif
 endif
+
+UPSTREAM:=$(shell $(GIT) rev-parse -q --verify origin/$(UPSTREAM_BRANCH) || \
+            $(GIT) rev-parse -q --verify $(UPSTREAM_BRANCH))
+
 ifeq ($(VERSION_ON_UPSTREAM),1)
   # UPSTREAM_BRANCH is expected to track mainline.
-  UPSTREAM:=$(shell $(GIT) rev-parse -q --verify origin/$(UPSTREAM_BRANCH) || \
-                  $(GIT) rev-parse -q --verify $(UPSTREAM_BRANCH))
   ifeq ($(UPSTREAM),)
       $(error "Missing an $(UPSTREAM_BRANCH) branch")
   endif

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2001
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to