diff mbox series

rules: fix empty COMMITCOUNT/AUTORELEASE

Message ID 20210129092556.714242-1-mail@aparcar.org
State Accepted
Delegated to: Paul Spooren
Headers show
Series rules: fix empty COMMITCOUNT/AUTORELEASE | expand

Commit Message

Paul Spooren Jan. 29, 2021, 9:25 a.m. UTC
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

Reported-by: Borromini @ IRC
Reported-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
---
 rules.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Petr Štetiar Jan. 29, 2021, 9:43 a.m. UTC | #1
Paul Spooren <mail@aparcar.org> [2021-01-28 23:25:57]:

Hi,

> ERROR: please fix package/utils/px5g-wolfssl/Makefile - \
> 	see logs/package/utils/px5g-wolfssl/dump.txt for details

I guess, that the actual error from that dump.txt file would be more useful in
this case :)

Cheers,

Petr
Paul Spooren Jan. 29, 2021, 6:19 p.m. UTC | #2
On Fri, Jan 29, 2021 at 10:43, Petr Štetiar <ynezz@true.cz> wrote:
> I guess, that the actual error from that dump.txt file would be more 
> useful in
> this case :)

Sorry, it was late:
Makefile:48: *** Package/px5g-wolfssl is missing the VERSION field. 
Stop.

VERSION is defined as PKG_VERSION-PKG_RELEASE, or whatever of both is 
there. In the case of px5g-wolfssl neither was available.
Ilya Lipnitskiy Jan. 29, 2021, 11:23 p.m. UTC | #3
On Fri, Jan 29, 2021 at 10:23 AM Paul Spooren <mail@aparcar.org> wrote:
>
> On Fri, Jan 29, 2021 at 10:43, Petr Štetiar <ynezz@true.cz> wrote:
> > I guess, that the actual error from that dump.txt file would be more
> > useful in
> > this case :)
>
> Sorry, it was late:
> Makefile:48: *** Package/px5g-wolfssl is missing the VERSION field.
> Stop.
>
> VERSION is defined as PKG_VERSION-PKG_RELEASE, or whatever of both is
> there. In the case of px5g-wolfssl neither was available.
An innocent question: Why doesn't this failure abort the
./scripts/feeds install -a script and why does it not show up when
install is re-run (had to clean the repo and redo the update to
reproduce this)?
diff mbox series

Patch

diff --git a/rules.mk b/rules.mk
index 1b63b8fc45..fc2c2efa2d 100644
--- a/rules.mk
+++ b/rules.mk
@@ -432,8 +432,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: ;