Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Bug on host-only packages
@ 2012-06-11  8:56 Thomas Petazzoni
  2012-06-19  9:15 ` Luca Ceresoli
  2012-10-14 15:17 ` [Buildroot] [PATCH] pkg-infra: correct the source name for " Arnout Vandecappelle
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2012-06-11  8:56 UTC (permalink / raw)
  To: buildroot

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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] Bug on host-only packages
  2012-06-11  8:56 [Buildroot] Bug on host-only packages Thomas Petazzoni
@ 2012-06-19  9:15 ` Luca Ceresoli
  2012-10-14 15:17 ` [Buildroot] [PATCH] pkg-infra: correct the source name for " Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Luca Ceresoli @ 2012-06-19  9:15 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thomas Petazzoni wrote:
> 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).

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] pkg-infra: correct the source name for host-only packages
  2012-06-11  8:56 [Buildroot] Bug on host-only packages Thomas Petazzoni
  2012-06-19  9:15 ` Luca Ceresoli
@ 2012-10-14 15:17 ` Arnout Vandecappelle
  2012-10-14 17:55   ` Thomas Petazzoni
  2012-10-15  7:29   ` Peter Korsgaard
  1 sibling, 2 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2012-10-14 15:17 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

---
 package/pkg-generic.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index ffe7dfb..270da60 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -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
 
-- 
tg: (0132e36..) t/correct-host-only-source-name (depends on: master)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] pkg-infra: correct the source name for host-only packages
  2012-10-14 15:17 ` [Buildroot] [PATCH] pkg-infra: correct the source name for " Arnout Vandecappelle
@ 2012-10-14 17:55   ` Thomas Petazzoni
  2012-10-15  7:29   ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2012-10-14 17:55 UTC (permalink / raw)
  To: buildroot


On Sun, 14 Oct 2012 17:17:34 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> 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.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] pkg-infra: correct the source name for host-only packages
  2012-10-14 15:17 ` [Buildroot] [PATCH] pkg-infra: correct the source name for " Arnout Vandecappelle
  2012-10-14 17:55   ` Thomas Petazzoni
@ 2012-10-15  7:29   ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2012-10-15  7:29 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> 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.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-15  7:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-11  8:56 [Buildroot] Bug on host-only packages Thomas Petazzoni
2012-06-19  9:15 ` Luca Ceresoli
2012-10-14 15:17 ` [Buildroot] [PATCH] pkg-infra: correct the source name for " Arnout Vandecappelle
2012-10-14 17:55   ` Thomas Petazzoni
2012-10-15  7:29   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox