core/pkg-download: fix autobuilder fallout
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
Mon, 2 Apr 2018 13:33:53 +0000 (15:33 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 2 Apr 2018 13:41:05 +0000 (15:41 +0200)
Some arguments can be empty, so we need to add single quote around them
But since they are sinple quote; double quote inside them are now not
interpreted by the shell and as such must be removed; hence the use of
qstrip.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/pkg-download.mk

index 2847a99d2f6c6ed5fdd6c29c651cf9167896c06d..2d5f26bfc574fb43f7ffda5b4c6de558e560a52f 100644 (file)
@@ -75,12 +75,12 @@ export BR_NO_CHECK_HASH_FOR =
 
 ifneq ($(call qstrip,$(BR2_PRIMARY_SITE)),)
 DOWNLOAD_URIS += \
-       -u $(call getschemeplusuri,$(BR2_PRIMARY_SITE),urlencode)
+       -u $(call getschemeplusuri,$(call qstrip,$(BR2_PRIMARY_SITE)),urlencode)
 endif
 
 ifeq ($(BR2_PRIMARY_SITE_ONLY),)
 DOWNLOAD_URIS += \
-       -u $($(PKG)_SITE_METHOD)+$(dir $(1))
+       -u $($(PKG)_SITE_METHOD)+$(dir $(call qstrip,$(1)))
 ifneq ($(call qstrip,$(BR2_BACKUP_SITE)),)
 DOWNLOAD_URIS += \
        -u $(call getschemeplusuri,$(BR2_BACKUP_SITE),urlencode)
@@ -88,14 +88,15 @@ endif
 endif
 
 define DOWNLOAD
-       $(Q)$(if $(filter bzr cvs hg svn,$($(PKG)_SITE_METHOD)),BR_NO_CHECK_HASH_FOR=$(notdir $(1))) \
+       $(Q)$(if $(filter bzr cvs hg svn,$($(PKG)_SITE_METHOD)),
+               BR_NO_CHECK_HASH_FOR=$(notdir $(call qstrip,$(1)))) \
        $(EXTRA_ENV) $(DL_WRAPPER) \
-               -c $($(PKG)_DL_VERSION) \
-               -f $(notdir $(1)) \
-               -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
-               -n $($(PKG)_BASENAME_RAW) \
-               -N $($(PKG)_RAWNAME) \
-               -o $(DL_DIR)/$(notdir $(1)) \
+               -c '$($(PKG)_DL_VERSION)' \
+               -f '$(notdir $(1))' \
+               -H '$(PKGDIR)/$($(PKG)_RAWNAME).hash' \
+               -n '$($(PKG)_BASENAME_RAW)' \
+               -N '$($(PKG)_RAWNAME)' \
+               -o '$(DL_DIR)/$(notdir $(1))' \
                $(if $($(PKG)_GIT_SUBMODULES),-r) \
                $(DOWNLOAD_URIS) \
                $(QUIET) \