[PATCH] build,package-defaults: AUTORELEASE as fallback

Paul Spooren mail at aparcar.org
Fri Jan 29 13:31:29 EST 2021


This commits changes the package defaults so that $(AUTORELEASE) is used
whenever no explicit PKG_RELEASE is set and $(COMMITCOUNT) whenever
neither is given.

Previously an explicit definition of PKG_RELEASE=$(AUTORELEASE) would be
required.

Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/package-defaults.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 2a04bc17e9..de3f07bb25 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -28,10 +28,14 @@ define Package/Default
     ifneq ($(PKG_RELEASE),)
       VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
     else
-      VERSION:=$(PKG_VERSION)
+      VERSION:=$(PKG_VERSION)-$(AUTORELEASE)
     endif
   else
-    VERSION:=$(PKG_RELEASE)
+    ifneq ($(PKG_RELEASE),)
+      VERSION:=$(PKG_RELEASE)
+    else
+      VERSION:=$(COMMITCOUNT)
+    endif
   endif
   ABI_VERSION:=
   ifneq ($(PKG_FLAGS),)
-- 
2.29.2




More information about the openwrt-devel mailing list