Discussion:
[PATCH] package/waf: purge trailig '/' from WAF_SITE
(too old to reply)
Carlos Santos
2018-12-10 18:45:59 UTC
Permalink
<PKG>_SITE cannot have a trailing slash.

Signed-off-by: Carlos Santos <***@datacom.com.br>
---
package/waf/waf.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/waf/waf.mk b/package/waf/waf.mk
index cb738a38fd..97bc2a8963 100644
--- a/package/waf/waf.mk
+++ b/package/waf/waf.mk
@@ -6,7 +6,7 @@

WAF_VERSION = 1.9.5
WAF_SOURCE = waf-$(WAF_VERSION)
-WAF_SITE = https://waf.io/
+WAF_SITE = https://waf.io

define HOST_WAF_EXTRACT_CMDS
$(INSTALL) -D -m 0755 $(HOST_WAF_DL_DIR)/waf-$(WAF_VERSION) $(@D)/waf
--
2.14.5
Thomas Petazzoni
2018-12-10 19:45:28 UTC
Permalink
Hello,
Post by Carlos Santos
<PKG>_SITE cannot have a trailing slash.
Odd, why isn't our check in package/pkg-generic.mk for trailing slashes
triggering on this?

We have this:

ifeq ($$(patsubst %/,ERROR,$$($(2)_SITE)),ERROR)
$$(error $(2)_SITE ($$($(2)_SITE)) cannot have a trailing slash)
endif

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Arnout Vandecappelle
2018-12-10 20:59:37 UTC
Permalink
Post by Thomas Petazzoni
Hello,
Post by Carlos Santos
<PKG>_SITE cannot have a trailing slash.
Odd, why isn't our check in package/pkg-generic.mk for trailing slashes
triggering on this?
ifeq ($$(patsubst %/,ERROR,$$($(2)_SITE)),ERROR)
$$(error $(2)_SITE ($$($(2)_SITE)) cannot have a trailing slash)
endif
Because that check is within

ifeq ($$($$($(2)_KCONFIG_VAR)),y)
...
endif

and these packages are host-only packages.

It has to be within that condition, since the _SITE may be set only or
differently based on kconfig options which are only set when the package is
selected. I tested and it fails for instance on arm-trusted-firmware if that
package is not selected.

We need Config.in.host :-)

Regards,
Arnout
Thomas Petazzoni
2018-12-10 21:02:04 UTC
Permalink
Hello,
Post by Arnout Vandecappelle
Because that check is within
ifeq ($$($$($(2)_KCONFIG_VAR)),y)
...
endif
and these packages are host-only packages.
Aah, indeed.
Post by Arnout Vandecappelle
It has to be within that condition, since the _SITE may be set only or
differently based on kconfig options which are only set when the package is
selected. I tested and it fails for instance on arm-trusted-firmware if that
package is not selected.
We need Config.in.host :-)
Hehe, yes, we do :)

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Arnout Vandecappelle
2018-12-10 21:02:55 UTC
Permalink
Post by Carlos Santos
<PKG>_SITE cannot have a trailing slash.
Committed to master after fixing the type in the commit title and adding an
explanation why this wasn't detected by the check in generic-package.

Regards,
Arnout
Post by Carlos Santos
---
package/waf/waf.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/waf/waf.mk b/package/waf/waf.mk
index cb738a38fd..97bc2a8963 100644
--- a/package/waf/waf.mk
+++ b/package/waf/waf.mk
@@ -6,7 +6,7 @@
WAF_VERSION = 1.9.5
WAF_SOURCE = waf-$(WAF_VERSION)
-WAF_SITE = https://waf.io/
+WAF_SITE = https://waf.io
define HOST_WAF_EXTRACT_CMDS
Loading...