Skip to contentSkip to conversation

pkg-download: support file:// in BR2_PRIMARY_SITE

PATCH Superseded Jérôme Pouiller 3 participants 5 messages Nov 17, 2015 – Nov 18, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-download: support file:// in BR2_PRIMARY_SITE

This feature was already discuted here:

http://lists.busybox.net/pipermail/buildroot/2015-April/125419.html

Personally, I have a big central directory with all tarballs I have ever downloaded. I use this feature to isolate tarballs necessary to build a configuration:

make project_defconfig
make BR2_DL_DIR=/tmp/mirror-project BR2_PRIMARY_SITE=file:///home/user/dl source tar -C /tmp -czvf mirror-project.tgz mirror-project

---
 package/pkg-download.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-download.mk +1 -0
index c86b9ab..f08f616 100644
@@ -214,6 +214,7 @@ endef
 define DOWNLOAD_INNER
 	$(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
 		case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
+			file) $(call $(3)_LOCALFILES,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
 			scp) $(call $(3)_SCP,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
 			*) $(call $(3)_WGET,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
 		esac ; \
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 pkg-download: support file:// in BR2_PRIMARY_SITE

Dear J?r?me Pouiller,

Quoted 11 lines · J?r?me Pouiller

This feature was already discuted here:

http://lists.busybox.net/pipermail/buildroot/2015-April/125419.html

Personally, I have a big central directory with all tarballs I have ever downloaded. I use this feature to isolate tarballs necessary to build a configuration:

make project_defconfig
make BR2_DL_DIR=/tmp/mirror-project BR2_PRIMARY_SITE=file:///home/user/dl source tar -C /tmp -czvf mirror-project.tgz mirror-project

You have a much simpler option:

make external-deps

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 pkg-download: support file:// in BR2_PRIMARY_SITE

Quoted 11 lines · Thomas Petazzoni

Dear J?r?me Pouiller,

Quoted 8 lines · J?r?me Pouiller

This feature was already discuted here:

http://lists.busybox.net/pipermail/buildroot/2015-April/125419.html

Personally, I have a big central directory with all tarballs I have ever downloaded. I use this feature to isolate tarballs necessary to build a configuration:

Quoted 7 lines
Quoted 3 lines

make project_defconfig
make BR2_DL_DIR=/tmp/mirror-project BR2_PRIMARY_SITE=file:///home/user/dl source tar -C /tmp -czvf mirror-project.tgz mirror-project

You have a much simpler option:

make external-deps

You probably mean:

for file in $(make external-deps); cp dl/$file /tmp/mirror-project; done

I think a local file PRIMARY_SITE can be useful for other situations as well,
e.g. a slow CIFS-mounted shared download location that is too slow to use as DL_DIR, so I think the feature has merit.

Regards,
Arnout

Quoted 3 lines

Thomas

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/1 pkg-download: support file:// in BR2_PRIMARY_SITE

Arnout, J?r?me,

Quoted 11 lines · Arnout Vandecappelle
Quoted 7 lines
Quoted 3 lines

make project_defconfig
make BR2_DL_DIR=/tmp/mirror-project BR2_PRIMARY_SITE=file:///home/user/dl source tar -C /tmp -czvf mirror-project.tgz mirror-project

You have a much simpler option:

make external-deps

You probably mean:

for file in $(make external-deps); cp dl/$file /tmp/mirror-project; done

Yes, indeed, I only pointed at "make external-deps", leaving it to the reader to figure out how to make use of it in the context of what J?r?me is trying to do. But I could have been more explicit.

Quoted 3 lines

I think a local file PRIMARY_SITE can be useful for other situations as well,
e.g. a slow CIFS-mounted shared download location that is too slow to use as DL_DIR, so I think the feature has merit.

Yes, I also think the feature has merit.

J?r?me, could you respin the patch after updating the Config.in help text of the BR2_PRIMARY_SITE option?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 pkg-download: support file:// in BR2_PRIMARY_SITE

In reply to Jérôme Pouiller
Quoted 8 lines · J?r?me Pouiller

This feature was already discuted here:

http://lists.busybox.net/pipermail/buildroot/2015-April/125419.html

Personally, I have a big central directory with all tarballs I have ever downloaded. I use this feature to isolate tarballs necessary to build a configuration:

Quoted 5 lines

make project_defconfig
make BR2_DL_DIR=/tmp/mirror-project BR2_PRIMARY_SITE=file:///home/user/dl source tar -C /tmp -czvf mirror-project.tgz mirror-project

for next

Regards,
Arnout

Quoted 17 lines
---
 package/pkg-download.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-download.mk +1 -0
index c86b9ab..f08f616 100644
@@ -214,6 +214,7 @@ endef
 define DOWNLOAD_INNER
 	$(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
 		case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
+			file) $(call $(3)_LOCALFILES,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
 			scp) $(call $(3)_SCP,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
 			*) $(call $(3)_WGET,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
 		esac ; \
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF