Skip to contentSkip to conversation

linux, uboot, mxs-bootlets, barebox: avoid double slash in CUSTOM_TARBALL

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages Jan 9, 2013 – Jan 13, 2013 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux, uboot, mxs-bootlets, barebox: avoid double slash in CUSTOM_TARBALL

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

The $(dir ...) function leaves a slash at the end, so that the LINUX_SITE variable for a custom tarball ends in a slash. The DOWNLOAD macro adds another slash between SITE and SOURCE, which results in a double slash in the download URL.

Fix this by stripping off the final slash from the _SITE in all packages that have a custom tarball.

Fixes https://bugs.busybox.net/show_bug.cgi?id=5846

---
 boot/barebox/barebox.mk           |    2 +-
 boot/mxs-bootlets/mxs-bootlets.mk |    2 +-
 boot/uboot/uboot.mk               |    2 +-
 linux/linux.mk                    |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
boot/barebox/barebox.mk +1 -1
index 6cc4976..211e06e 100644
@@ -9,7 +9,7 @@ BAREBOX_VERSION    = $(call qstrip,$(BR2_TARGET_BAREBOX_VERSION))
 ifeq ($(BAREBOX_VERSION),custom)
 # Handle custom Barebox tarballs as specified by the configuration
 BAREBOX_TARBALL = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_TARBALL_LOCATION))
-BAREBOX_SITE    = $(dir $(BAREBOX_TARBALL))
+BAREBOX_SITE    = $(patsubst %/,%,$(dir $(BAREBOX_TARBALL)))
 BAREBOX_SOURCE  = $(notdir $(BAREBOX_TARBALL))
 else ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_GIT),y)
 BAREBOX_SITE        = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_GIT_REPO_URL))
boot/mxs-bootlets/mxs-bootlets.mk +1 -1
index 1975d47..f93ff81 100644
@@ -6,7 +6,7 @@
 
 ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL),y)
 	MXS_BOOTLETS_TARBALL = $(call qstrip,$(BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL))
-	MXS_BOOTLETS_SITE = $(dir $(MXS_BOOTLETS_TARBALL))
+	MXS_BOOTLETS_SITE = $(patsubst %/,%,$(dir $(MXS_BOOTLETS_TARBALL)))
 	MXS_BOOTLETS_SOURCE  = $(notdir $(MXS_BOOTLETS_TARBALL))
 else ifeq ($(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT),y)
 	MXS_BOOTLETS_SITE = $(BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL)
boot/uboot/uboot.mk +1 -1
index 619f2e1..ea77259 100644
@@ -14,7 +14,7 @@ UBOOT_INSTALL_IMAGES = YES
 ifeq ($(UBOOT_VERSION),custom)
 # Handle custom U-Boot tarballs as specified by the configuration
 UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION))
-UBOOT_SITE    = $(dir $(UBOOT_TARBALL))
+UBOOT_SITE    = $(patsubst %/,%,$(dir $(UBOOT_TARBALL)))
 UBOOT_SOURCE  = $(notdir $(UBOOT_TARBALL))
 else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y)
 UBOOT_SITE        = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL))
linux/linux.mk +1 -1
index 61d4267..91a9f50 100644
@@ -10,7 +10,7 @@ LINUX_LICENSE_FILES = COPYING
 # Compute LINUX_SOURCE and LINUX_SITE from the configuration
 ifeq ($(LINUX_VERSION),custom)
 LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
-LINUX_SITE = $(dir $(LINUX_TARBALL))
+LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
 LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 linux, uboot, mxs-bootlets, barebox: avoid double slash in CUSTOM_TARBALL

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]> Arnout> The $(dir ...) function leaves a slash at the end, so that the LINUX_SITE Arnout> variable for a custom tarball ends in a slash. The DOWNLOAD macro adds Arnout> another slash between SITE and SOURCE, which results in a double slash in Arnout> the download URL.

Arnout> Fix this by stripping off the final slash from the _SITE in all packages that Arnout> have a custom tarball.

Arnout> Fixes https://bugs.busybox.net/show_bug.cgi?id=5846

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard