Skip to contentSkip to conversation

Bug on host-only packages

Buildroot New Thomas Petazzoni 4 participants 5 messages Jun 11, 2012 – Oct 15, 2012

lore
Share & tools
lore
#0 lore raw

Hello,

I have the impression that there is a bug on the download step of host-only packages: the tarballs are named host-foobar-xxx.tar.gz instead of just foobar-xxx.tar.gz. For example, in my download directory, I have:

host-lpc3250loader-1.0.tar.gz
host-omap-u-boot-utils-8aff852322.tar.gz

Even though those don't have target variants (so there is no problematic consequences to this bug), I think that for consistency reasons they should be named:

lpc3250loader-1.0.tar.gz
omap-u-boot-utils-8aff852322.tar.gz

Most likely a bug in the GENTARGETS infrastructure. I haven't look at the code yet, I'm just reporting the issue (don't have the time to dig into it right now).

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#1 lore raw

Hi Thomas,

Quoted 14 lines · Thomas Petazzoni

Hello,

I have the impression that there is a bug on the download step of host-only packages: the tarballs are named host-foobar-xxx.tar.gz instead of just foobar-xxx.tar.gz. For example, in my download directory, I have:

host-lpc3250loader-1.0.tar.gz
host-omap-u-boot-utils-8aff852322.tar.gz

Even though those don't have target variants (so there is no problematic consequences to this bug), I think that for consistency reasons they should be named:

Quoted 6 lines

lpc3250loader-1.0.tar.gz
omap-u-boot-utils-8aff852322.tar.gz

Most likely a bug in the GENTARGETS infrastructure. I haven't look at the code yet, I'm just reporting the issue (don't have the time to dig into it right now).

I noticed this problem as well. It seems to be caused by the fact that DOWNLOAD_INNER passes $(1) and $(2) to the DOWNLOAD_WGET, which contain the correct info, while it passes nothing to other downloaders, which have to do on their own based on $($(PKG)_SOURCE). The latter is in turn undefined for git (and other) methods, so it defaults to $(2)_BASE_NAME, which has the "host-" prefix.

I had no time to go on and fix the issue properly.

Slightly off topic, I think we should consider having an extra argument to GENTARGETS_INNER holding the lowercase package name, without the host-prefix,
as we do for the uppercase package name.
This would ease further operations and, ultimately, fixing the bug in discussion.

All of these are in my todo list (obviously unscheduled).

Luca

#2 lore raw

PATCH 1/1 pkg-infra: correct the source name for host-only packages

In reply to Thomas Petazzoni

Host-only package that don't define their <PKG>_SOURCE variable would default to host-<pkg>-<version>.tar.gz. It's more logical to remove the host- prefix in this case.

This problem is most apparent with host-only packages downloaded from version control, because they never define <PKG>_SOURCE.

Reported by Thomas Petazzoni and initial analysis by Luca Ceresoli.

---
 package/pkg-generic.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-generic.mk +1 -1
index ffe7dfb..270da60 100644
@@ -231,7 +231,7 @@ ifndef $(2)_SOURCE
  ifdef $(3)_SOURCE
   $(2)_SOURCE = $($(3)_SOURCE)
  else
-  $(2)_SOURCE			?= $$($(2)_BASE_NAME).tar.gz
+  $(2)_SOURCE			?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
  endif
 endif
 
Signature · 1 line
tg: (0132e36..) t/correct-host-only-source-name (depends on: master)
#3 lore raw

PATCH 1/1 pkg-infra: correct the source name for host-only packages

Quoted 10 lines · Arnout Vandecappelle (Essensium/Mind)

Host-only package that don't define their <PKG>_SOURCE variable would default to host-<pkg>-<version>.tar.gz. It's more logical to remove the host- prefix in this case.

This problem is most apparent with host-only packages downloaded from version control, because they never define <PKG>_SOURCE.

Reported by Thomas Petazzoni and initial analysis by Luca Ceresoli.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 1/1 pkg-infra: correct the source name for host-only packages

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Arnout> Host-only package that don't define their <PKG>_SOURCE variable would Arnout> default to host-<pkg>-<version>.tar.gz. It's more logical to remove Arnout> the host- prefix in this case.

Arnout> This problem is most apparent with host-only packages downloaded from Arnout> version control, because they never define <PKG>_SOURCE.

Arnout> Reported by Thomas Petazzoni and initial analysis by Luca Ceresoli.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard