[openwrt/openwrt] rules: fix empty COMMITCOUNT/AUTORELEASE

LEDE Commits lede-commits at lists.infradead.org
Sat Jan 30 17:22:10 EST 2021


aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ddab795b370da986149f8c8e6b3455bf9c1066fe

commit ddab795b370da986149f8c8e6b3455bf9c1066fe
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Thu Jan 28 23:17:10 2021 -1000

    rules: fix empty COMMITCOUNT/AUTORELEASE
    
    Packages that are in-tree only often lack a PKG_VERSION and only use the
    PKG_RELEASE to mark changes. Using COMMITCOUNT/AUTORELEASE variables
    causes an issue as both variables are empty during the metadata DUMP
    phase.
    
    Instead of leaving these variables empty and causing an error message
    like below, set the variables to 0 during dumping. On actual building
    the variable is evaluated causing in a value above 0.
    
    ERROR: please fix package/utils/px5g-wolfssl/Makefile - \
            see logs/package/utils/px5g-wolfssl/dump.txt for details
    
    Makefile:48: *** Package/px5g-wolfssl is missing the VERSION field.  Stop.
    
    Reported-by: Daniel Golle <daniel at makrotopia.org>
    Reported-by: Stijn Segers <foss at volatilesystems.org>
    Reported-by: Stijn Tintel <stijn at linux-ipv6.be>
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 rules.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules.mk b/rules.mk
index b1b69eabf9..b658e93020 100644
--- a/rules.mk
+++ b/rules.mk
@@ -431,8 +431,8 @@ $(shell \
 )
 endef
 
-COMMITCOUNT = $(if $(DUMP),,$(call commitcount))
-AUTORELEASE = $(if $(DUMP),,$(call commitcount,1))
+COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
+AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
 
 all:
 FORCE: ;



More information about the lede-commits mailing list