All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC 1/2] non-versioned packages
@ 2015-09-30 21:12 Alex Suykov
  2015-09-30 21:13 ` [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton Alex Suykov
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Alex Suykov @ 2015-09-30 21:12 UTC (permalink / raw)
  To: buildroot

In case (PKG)_VERSION is empty, do not attempt to download sources
for the package. Attempts to download (package)-undefined.tar.gz
are pointless, the file is not likely to exist.

Also, output/build/(package) looks better and makes more sense than
output/build/(package)-undefined for such packages.

Non-versioned packages within buildroot: skeleton and mke2img.

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
---
 package/pkg-generic.mk | 6 ++----
 package/pkg-utils.mk   | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

The actual case the prompted me to do the change: I'm using buildroot
as a test rig for building and running HEAD shapshots of a local git repo.
"HEAD" is not a proper version, but without these changes I could only
get "package-unknown" or "package-HEAD", and it took some effort to prevent
download attempts.

I'm not sure how common this is, but it's possible. And since no proper
downloadable package should ever come without a version, changing the way
empty VERSION is handled should affect them.


diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 5201fca..cb5545b 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -332,8 +332,6 @@ ifndef $(2)_VERSION
   $(2)_DL_VERSION := $$($(3)_DL_VERSION)
  else ifdef $(3)_VERSION
   $(2)_DL_VERSION := $$($(3)_VERSION)
- else
-  $(2)_DL_VERSION = undefined
  endif
 else
  $(2)_DL_VERSION := $$(strip $$($(2)_VERSION))
@@ -344,7 +342,7 @@ ifdef $(3)_OVERRIDE_SRCDIR
   $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
 endif
 
-$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
+$(2)_BASE_NAME	=  $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
 $(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
 $(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
 
@@ -374,7 +372,7 @@ endif
 ifndef $(2)_SOURCE
  ifdef $(3)_SOURCE
   $(2)_SOURCE = $$($(3)_SOURCE)
- else
+ else ifdef $(2)_VERSION
   $(2)_SOURCE			?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
  endif
 endif
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 44bd2c9..c098b55 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -83,7 +83,7 @@ INFLATE.tar  = cat
 suitable-extractor = $(INFLATE$(suffix $(1)))
 
 # MESSAGE Macro -- display a message in bold type
-MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)"
+MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_BASE_NAME) $(call qstrip,$(1))$(TERM_RESET)"
 TERM_BOLD := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)
 
-- 
2.0.3

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

* [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton
  2015-09-30 21:12 [Buildroot] [RFC 1/2] non-versioned packages Alex Suykov
@ 2015-09-30 21:13 ` Alex Suykov
  2016-01-19 22:33   ` Yann E. MORIN
  2015-09-30 22:15 ` [Buildroot] [RFC 1/2] non-versioned packages Yann E. MORIN
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Alex Suykov @ 2015-09-30 21:13 UTC (permalink / raw)
  To: buildroot

With non-versioned packages patch applied, there is no need
to set empty _SOURCE.

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
---
 package/mke2img/mke2img.mk   | 1 -
 package/skeleton/skeleton.mk | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/package/mke2img/mke2img.mk b/package/mke2img/mke2img.mk
index 04aaa8f..9de387a 100644
--- a/package/mke2img/mke2img.mk
+++ b/package/mke2img/mke2img.mk
@@ -4,7 +4,6 @@
 #
 ################################################################################
 
-HOST_MKE2IMG_SOURCE =
 HOST_MKE2IMG_DEPENDENCIES = host-genext2fs host-e2fsprogs
 
 define HOST_MKE2IMG_INSTALL_CMDS
diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
index 48e7085..c182b54 100644
--- a/package/skeleton/skeleton.mk
+++ b/package/skeleton/skeleton.mk
@@ -4,9 +4,6 @@
 #
 ################################################################################
 
-# source included in buildroot
-SKELETON_SOURCE =
-
 # The skeleton can't depend on the toolchain, since all packages depends on the
 # skeleton and the toolchain is a target package, as is skeleton.
 # Hence, skeleton would depends on the toolchain and the toolchain would depend
-- 
2.0.3

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

* [Buildroot] [RFC 1/2] non-versioned packages
  2015-09-30 21:12 [Buildroot] [RFC 1/2] non-versioned packages Alex Suykov
  2015-09-30 21:13 ` [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton Alex Suykov
@ 2015-09-30 22:15 ` Yann E. MORIN
  2015-09-30 22:52   ` Alex Suykov
  2015-10-15 20:41 ` Thomas Petazzoni
  2016-01-19 22:32 ` Yann E. MORIN
  3 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2015-09-30 22:15 UTC (permalink / raw)
  To: buildroot

Alex, All,

On 2015-10-01 00:12 +0300, Alex Suykov spake thusly:
> In case (PKG)_VERSION is empty, do not attempt to download sources
> for the package. Attempts to download (package)-undefined.tar.gz
> are pointless, the file is not likely to exist.
> 
> Also, output/build/(package) looks better and makes more sense than
> output/build/(package)-undefined for such packages.
> 
> Non-versioned packages within buildroot: skeleton and mke2img.

Wrong. We also have:
    googlefontdirectory
    gadgetfs-test
  * initscripts
 r+ * mcookie
    cache-calibrator

[*] like skeleton and mke2img, those are internal packages. so it's
normal they have no version.
[+] mcookie is now provided by util-linux, so we should probably get rid
of our internal copy.

Also, there has been a new package discussed on the list today that had
no version either (libsoil):
    http://lists.busybox.net/pipermail/buildroot/2015-September/140370.html
    http://lists.busybox.net/pipermail/buildroot/2015-September/140480.html
    http://lists.busybox.net/pipermail/buildroot/2015-September/140508.html

And yes, I would like to keep being able to have packages without a
version.Even if  upstream are not playing by the rules, it is perfectly
legit that we have support for that.

Regards,
Yann E. MORIN.

> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
> ---
>  package/pkg-generic.mk | 6 ++----
>  package/pkg-utils.mk   | 2 +-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> The actual case the prompted me to do the change: I'm using buildroot
> as a test rig for building and running HEAD shapshots of a local git repo.
> "HEAD" is not a proper version, but without these changes I could only
> get "package-unknown" or "package-HEAD", and it took some effort to prevent
> download attempts.
> 
> I'm not sure how common this is, but it's possible. And since no proper
> downloadable package should ever come without a version, changing the way
> empty VERSION is handled should affect them.
> 
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 5201fca..cb5545b 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -332,8 +332,6 @@ ifndef $(2)_VERSION
>    $(2)_DL_VERSION := $$($(3)_DL_VERSION)
>   else ifdef $(3)_VERSION
>    $(2)_DL_VERSION := $$($(3)_VERSION)
> - else
> -  $(2)_DL_VERSION = undefined
>   endif
>  else
>   $(2)_DL_VERSION := $$(strip $$($(2)_VERSION))
> @@ -344,7 +342,7 @@ ifdef $(3)_OVERRIDE_SRCDIR
>    $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
>  endif
>  
> -$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
> +$(2)_BASE_NAME	=  $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
>  $(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
>  $(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
>  
> @@ -374,7 +372,7 @@ endif
>  ifndef $(2)_SOURCE
>   ifdef $(3)_SOURCE
>    $(2)_SOURCE = $$($(3)_SOURCE)
> - else
> + else ifdef $(2)_VERSION
>    $(2)_SOURCE			?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
>   endif
>  endif
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index 44bd2c9..c098b55 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -83,7 +83,7 @@ INFLATE.tar  = cat
>  suitable-extractor = $(INFLATE$(suffix $(1)))
>  
>  # MESSAGE Macro -- display a message in bold type
> -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)"
> +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_BASE_NAME) $(call qstrip,$(1))$(TERM_RESET)"
>  TERM_BOLD := $(shell tput smso)
>  TERM_RESET := $(shell tput rmso)
>  
> -- 
> 2.0.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [RFC 1/2] non-versioned packages
  2015-09-30 22:15 ` [Buildroot] [RFC 1/2] non-versioned packages Yann E. MORIN
@ 2015-09-30 22:52   ` Alex Suykov
  0 siblings, 0 replies; 11+ messages in thread
From: Alex Suykov @ 2015-09-30 22:52 UTC (permalink / raw)
  To: buildroot

Thu, Oct 01, 2015 at 12:15:17AM +0200, Yann E. MORIN wrote:

> And yes, I would like to keep being able to have packages without a
> version.Even if  upstream are not playing by the rules, it is perfectly
> legit that we have support for that.

Sorry, bad wording in patch description. Packages with explicitly
set (PKG)_SOURCE are ok, they only get build dir name change:
output/build/initscripts-undefined -> output/build/initscripts and so on.

The change is for packages that lack both _VERSION and _SOURCE.
Current BR behavior is to assign (PKG)_SOURCE = (pkg)-undefined.tar.gz
and try to download that, which I think is never correct.
It's either explicitly-set custom SOURCE, or no sources at all.

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

* [Buildroot] [RFC 1/2] non-versioned packages
  2015-09-30 21:12 [Buildroot] [RFC 1/2] non-versioned packages Alex Suykov
  2015-09-30 21:13 ` [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton Alex Suykov
  2015-09-30 22:15 ` [Buildroot] [RFC 1/2] non-versioned packages Yann E. MORIN
@ 2015-10-15 20:41 ` Thomas Petazzoni
  2015-10-15 22:31   ` Arnout Vandecappelle
  2016-01-19 22:32 ` Yann E. MORIN
  3 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2015-10-15 20:41 UTC (permalink / raw)
  To: buildroot

Peter, Arnout, Yann,

What do you think of this patch (and the following one) ? Even if the
commit log isn't very clear, I believe the idea behind the patch is
quite good. It is indeed a bit pointless to set <pkg>_VERSION to
"undefined" when it is not defined.

Though I see that really only as a minor cosmetic improvement: besides
changing the message and the name of the build directory, it doesn't
change anything.

But let's take a decision on this, and not keep the patches around
forever.

Thomas

On Thu, 1 Oct 2015 00:12:43 +0300, Alex Suykov wrote:
> In case (PKG)_VERSION is empty, do not attempt to download sources
> for the package. Attempts to download (package)-undefined.tar.gz
> are pointless, the file is not likely to exist.
> 
> Also, output/build/(package) looks better and makes more sense than
> output/build/(package)-undefined for such packages.
> 
> Non-versioned packages within buildroot: skeleton and mke2img.
> 
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
> ---
>  package/pkg-generic.mk | 6 ++----
>  package/pkg-utils.mk   | 2 +-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> The actual case the prompted me to do the change: I'm using buildroot
> as a test rig for building and running HEAD shapshots of a local git repo.
> "HEAD" is not a proper version, but without these changes I could only
> get "package-unknown" or "package-HEAD", and it took some effort to prevent
> download attempts.
> 
> I'm not sure how common this is, but it's possible. And since no proper
> downloadable package should ever come without a version, changing the way
> empty VERSION is handled should affect them.
> 
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 5201fca..cb5545b 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -332,8 +332,6 @@ ifndef $(2)_VERSION
>    $(2)_DL_VERSION := $$($(3)_DL_VERSION)
>   else ifdef $(3)_VERSION
>    $(2)_DL_VERSION := $$($(3)_VERSION)
> - else
> -  $(2)_DL_VERSION = undefined
>   endif
>  else
>   $(2)_DL_VERSION := $$(strip $$($(2)_VERSION))
> @@ -344,7 +342,7 @@ ifdef $(3)_OVERRIDE_SRCDIR
>    $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
>  endif
>  
> -$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
> +$(2)_BASE_NAME	=  $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
>  $(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
>  $(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
>  
> @@ -374,7 +372,7 @@ endif
>  ifndef $(2)_SOURCE
>   ifdef $(3)_SOURCE
>    $(2)_SOURCE = $$($(3)_SOURCE)
> - else
> + else ifdef $(2)_VERSION
>    $(2)_SOURCE			?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
>   endif
>  endif
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index 44bd2c9..c098b55 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -83,7 +83,7 @@ INFLATE.tar  = cat
>  suitable-extractor = $(INFLATE$(suffix $(1)))
>  
>  # MESSAGE Macro -- display a message in bold type
> -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)"
> +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_BASE_NAME) $(call qstrip,$(1))$(TERM_RESET)"
>  TERM_BOLD := $(shell tput smso)
>  TERM_RESET := $(shell tput rmso)
>  



-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [RFC 1/2] non-versioned packages
  2015-10-15 20:41 ` Thomas Petazzoni
@ 2015-10-15 22:31   ` Arnout Vandecappelle
  0 siblings, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2015-10-15 22:31 UTC (permalink / raw)
  To: buildroot

On 15-10-15 22:41, Thomas Petazzoni wrote:
> Peter, Arnout, Yann,
> 
> What do you think of this patch (and the following one) ? Even if the
> commit log isn't very clear, I believe the idea behind the patch is
> quite good. It is indeed a bit pointless to set <pkg>_VERSION to
> "undefined" when it is not defined.

 Well, I do like the current situation that in the build directory it's very
explicity that the package has no explicit version. But I don't find it very
important so I can accept this change.

> Though I see that really only as a minor cosmetic improvement: besides
> changing the message and the name of the build directory, it doesn't
> change anything.

 It actually does change something: it avoids downloads of packages without
explicit _SOURCE or _VERSION. This sounds like a useful feature to me.


 Regards,
 Arnout

> But let's take a decision on this, and not keep the patches around
> forever.
> 
> Thomas
> 
> On Thu, 1 Oct 2015 00:12:43 +0300, Alex Suykov wrote:
>> In case (PKG)_VERSION is empty, do not attempt to download sources
>> for the package. Attempts to download (package)-undefined.tar.gz
>> are pointless, the file is not likely to exist.
>>
>> Also, output/build/(package) looks better and makes more sense than
>> output/build/(package)-undefined for such packages.
>>
>> Non-versioned packages within buildroot: skeleton and mke2img.
>>
>> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
>> ---
>>  package/pkg-generic.mk | 6 ++----
>>  package/pkg-utils.mk   | 2 +-
>>  2 files changed, 3 insertions(+), 5 deletions(-)
>>
>> The actual case the prompted me to do the change: I'm using buildroot
>> as a test rig for building and running HEAD shapshots of a local git repo.
>> "HEAD" is not a proper version, but without these changes I could only
>> get "package-unknown" or "package-HEAD", and it took some effort to prevent
>> download attempts.
>>
>> I'm not sure how common this is, but it's possible. And since no proper
>> downloadable package should ever come without a version, changing the way
>> empty VERSION is handled should affect them.
>>
>>
>> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
>> index 5201fca..cb5545b 100644
>> --- a/package/pkg-generic.mk
>> +++ b/package/pkg-generic.mk
>> @@ -332,8 +332,6 @@ ifndef $(2)_VERSION
>>    $(2)_DL_VERSION := $$($(3)_DL_VERSION)
>>   else ifdef $(3)_VERSION
>>    $(2)_DL_VERSION := $$($(3)_VERSION)
>> - else
>> -  $(2)_DL_VERSION = undefined
>>   endif
>>  else
>>   $(2)_DL_VERSION := $$(strip $$($(2)_VERSION))
>> @@ -344,7 +342,7 @@ ifdef $(3)_OVERRIDE_SRCDIR
>>    $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
>>  endif
>>  
>> -$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
>> +$(2)_BASE_NAME	=  $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
>>  $(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
>>  $(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
>>  
>> @@ -374,7 +372,7 @@ endif
>>  ifndef $(2)_SOURCE
>>   ifdef $(3)_SOURCE
>>    $(2)_SOURCE = $$($(3)_SOURCE)
>> - else
>> + else ifdef $(2)_VERSION
>>    $(2)_SOURCE			?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
>>   endif
>>  endif
>> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
>> index 44bd2c9..c098b55 100644
>> --- a/package/pkg-utils.mk
>> +++ b/package/pkg-utils.mk
>> @@ -83,7 +83,7 @@ INFLATE.tar  = cat
>>  suitable-extractor = $(INFLATE$(suffix $(1)))
>>  
>>  # MESSAGE Macro -- display a message in bold type
>> -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)"
>> +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_BASE_NAME) $(call qstrip,$(1))$(TERM_RESET)"
>>  TERM_BOLD := $(shell tput smso)
>>  TERM_RESET := $(shell tput rmso)
>>  
> 
> 
> 


-- 
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

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

* [Buildroot] [RFC 1/2] non-versioned packages
  2015-09-30 21:12 [Buildroot] [RFC 1/2] non-versioned packages Alex Suykov
                   ` (2 preceding siblings ...)
  2015-10-15 20:41 ` Thomas Petazzoni
@ 2016-01-19 22:32 ` Yann E. MORIN
  2016-01-24 22:33   ` Alex Suykov
  3 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2016-01-19 22:32 UTC (permalink / raw)
  To: buildroot

Alex, All,

On 2015-10-01 00:12 +0300, Alex Suykov spake thusly:
> In case (PKG)_VERSION is empty, do not attempt to download sources
> for the package. Attempts to download (package)-undefined.tar.gz
> are pointless, the file is not likely to exist.
> 
> Also, output/build/(package) looks better and makes more sense than
> output/build/(package)-undefined for such packages.
> 
> Non-versioned packages within buildroot: skeleton and mke2img.
> 
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>

Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

However, I'm still not convinced that the commit log is correct. What
about something like;

    core: do not attempt to download when no _VERSION and no _SOURCE

    Currently, when the package defines no _SOURCE and no _VERSION
    variables, we end up trying to download <PACKAGE>-undefined.tar.gz.

    This is utterly pointless.

    Change the logic to not attempt a download when neither _SOURCE nor
    _VERSION is set:
      - do not set an indefined _VERSION to "undefined"
      - do not append an empty (or "undefined") version to the package
        rawname
      - use the package rawname in the <ESSAGE macro

    Consequently, for packages that have no _VERSION, the build
    directory will be just the package name (which to some may look
    nicer than the current "package-undefined").

    Furthermore, the message trace is also a bit leaner (to the same
    people that find "package" nicer than "package-undefined"). ;-)

    Signed-off-by: You
    Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
    Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/pkg-generic.mk | 6 ++----
>  package/pkg-utils.mk   | 2 +-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> The actual case the prompted me to do the change: I'm using buildroot
> as a test rig for building and running HEAD shapshots of a local git repo.
> "HEAD" is not a proper version, but without these changes I could only
> get "package-unknown" or "package-HEAD", and it took some effort to prevent
> download attempts.
> 
> I'm not sure how common this is, but it's possible. And since no proper
> downloadable package should ever come without a version, changing the way
> empty VERSION is handled should affect them.
> 
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 5201fca..cb5545b 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -332,8 +332,6 @@ ifndef $(2)_VERSION
>    $(2)_DL_VERSION := $$($(3)_DL_VERSION)
>   else ifdef $(3)_VERSION
>    $(2)_DL_VERSION := $$($(3)_VERSION)
> - else
> -  $(2)_DL_VERSION = undefined
>   endif
>  else
>   $(2)_DL_VERSION := $$(strip $$($(2)_VERSION))
> @@ -344,7 +342,7 @@ ifdef $(3)_OVERRIDE_SRCDIR
>    $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
>  endif
>  
> -$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
> +$(2)_BASE_NAME	=  $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
>  $(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
>  $(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
>  
> @@ -374,7 +372,7 @@ endif
>  ifndef $(2)_SOURCE
>   ifdef $(3)_SOURCE
>    $(2)_SOURCE = $$($(3)_SOURCE)
> - else
> + else ifdef $(2)_VERSION
>    $(2)_SOURCE			?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
>   endif
>  endif
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index 44bd2c9..c098b55 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -83,7 +83,7 @@ INFLATE.tar  = cat
>  suitable-extractor = $(INFLATE$(suffix $(1)))
>  
>  # MESSAGE Macro -- display a message in bold type
> -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)"
> +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_BASE_NAME) $(call qstrip,$(1))$(TERM_RESET)"
>  TERM_BOLD := $(shell tput smso)
>  TERM_RESET := $(shell tput rmso)
>  
> -- 
> 2.0.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton
  2015-09-30 21:13 ` [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton Alex Suykov
@ 2016-01-19 22:33   ` Yann E. MORIN
  2016-01-20 14:14     ` Thomas De Schampheleire
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2016-01-19 22:33 UTC (permalink / raw)
  To: buildroot

Alex, All,

On 2015-10-01 00:13 +0300, Alex Suykov spake thusly:
> With non-versioned packages patch applied, there is no need
> to set empty _SOURCE.
> 
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>

After the previous patch has been applied:

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/mke2img/mke2img.mk   | 1 -
>  package/skeleton/skeleton.mk | 3 ---
>  2 files changed, 4 deletions(-)
> 
> diff --git a/package/mke2img/mke2img.mk b/package/mke2img/mke2img.mk
> index 04aaa8f..9de387a 100644
> --- a/package/mke2img/mke2img.mk
> +++ b/package/mke2img/mke2img.mk
> @@ -4,7 +4,6 @@
>  #
>  ################################################################################
>  
> -HOST_MKE2IMG_SOURCE =
>  HOST_MKE2IMG_DEPENDENCIES = host-genext2fs host-e2fsprogs
>  
>  define HOST_MKE2IMG_INSTALL_CMDS
> diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
> index 48e7085..c182b54 100644
> --- a/package/skeleton/skeleton.mk
> +++ b/package/skeleton/skeleton.mk
> @@ -4,9 +4,6 @@
>  #
>  ################################################################################
>  
> -# source included in buildroot
> -SKELETON_SOURCE =
> -
>  # The skeleton can't depend on the toolchain, since all packages depends on the
>  # skeleton and the toolchain is a target package, as is skeleton.
>  # Hence, skeleton would depends on the toolchain and the toolchain would depend
> -- 
> 2.0.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton
  2016-01-19 22:33   ` Yann E. MORIN
@ 2016-01-20 14:14     ` Thomas De Schampheleire
  2016-01-25  0:16       ` Arnout Vandecappelle
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas De Schampheleire @ 2016-01-20 14:14 UTC (permalink / raw)
  To: buildroot

On Tue, Jan 19, 2016 at 11:33 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Alex, All,
>
> On 2015-10-01 00:13 +0300, Alex Suykov spake thusly:
>> With non-versioned packages patch applied, there is no need
>> to set empty _SOURCE.
>>
>> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
>
> After the previous patch has been applied:
>
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Regards,
> Yann E. MORIN.
>
>> ---
>>  package/mke2img/mke2img.mk   | 1 -
>>  package/skeleton/skeleton.mk | 3 ---
>>  2 files changed, 4 deletions(-)
>>
>> diff --git a/package/mke2img/mke2img.mk b/package/mke2img/mke2img.mk
>> index 04aaa8f..9de387a 100644
>> --- a/package/mke2img/mke2img.mk
>> +++ b/package/mke2img/mke2img.mk
>> @@ -4,7 +4,6 @@
>>  #
>>  ################################################################################
>>
>> -HOST_MKE2IMG_SOURCE =
>>  HOST_MKE2IMG_DEPENDENCIES = host-genext2fs host-e2fsprogs
>>
>>  define HOST_MKE2IMG_INSTALL_CMDS
>> diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
>> index 48e7085..c182b54 100644
>> --- a/package/skeleton/skeleton.mk
>> +++ b/package/skeleton/skeleton.mk
>> @@ -4,9 +4,6 @@
>>  #
>>  ################################################################################
>>
>> -# source included in buildroot
>> -SKELETON_SOURCE =
>> -
>>  # The skeleton can't depend on the toolchain, since all packages depends on the
>>  # skeleton and the toolchain is a target package, as is skeleton.
>>  # Hence, skeleton would depends on the toolchain and the toolchain would depend
>

Question is whether it is correct that mke2img and skeleton are unversioned.
Packages that are similar are makedevs, mkpasswd and getent, where the
_VERSION is explicitly set to match the Buildroot version:
MAKEDEVS_VERSION = buildroot-$(BR2_VERSION)
I think that mke2img is in the same boat as these packages, and so
should follow the same strategy.

/Thomas

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

* [Buildroot] [RFC 1/2] non-versioned packages
  2016-01-19 22:32 ` Yann E. MORIN
@ 2016-01-24 22:33   ` Alex Suykov
  0 siblings, 0 replies; 11+ messages in thread
From: Alex Suykov @ 2016-01-24 22:33 UTC (permalink / raw)
  To: buildroot

Tue, Jan 19, 2016 at 11:32:33PM +0100, Yann E. MORIN wrote:

> However, I'm still not convinced that the commit log is correct. What
> about something like;
> (...)

No problem, text updated.
And the patch itself updated to apply cleanly onto current master
(nothing significant, just line numbers).

I'm sending it as PATCH, but without v2 because the original message was RFC.

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

* [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton
  2016-01-20 14:14     ` Thomas De Schampheleire
@ 2016-01-25  0:16       ` Arnout Vandecappelle
  0 siblings, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2016-01-25  0:16 UTC (permalink / raw)
  To: buildroot

On 20-01-16 15:14, Thomas De Schampheleire wrote:
> On Tue, Jan 19, 2016 at 11:33 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>> Alex, All,
>>
>> On 2015-10-01 00:13 +0300, Alex Suykov spake thusly:
>>> With non-versioned packages patch applied, there is no need
>>> to set empty _SOURCE.
>>>
>>> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
>>
>> After the previous patch has been applied:
>>
>> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[snip]
>>> -# source included in buildroot
>>> -SKELETON_SOURCE =
>>> -
>>>  # The skeleton can't depend on the toolchain, since all packages depends on the
>>>  # skeleton and the toolchain is a target package, as is skeleton.
>>>  # Hence, skeleton would depends on the toolchain and the toolchain would depend
>>
> 
> Question is whether it is correct that mke2img and skeleton are unversioned.
> Packages that are similar are makedevs, mkpasswd and getent, where the
> _VERSION is explicitly set to match the Buildroot version:
> MAKEDEVS_VERSION = buildroot-$(BR2_VERSION)
> I think that mke2img is in the same boat as these packages, and so
> should follow the same strategy.

 +1 to that.

 Alex, will you send a v2 that sets the version of mke2img and skeleton to
buildroot-$(BR2_VERSION) instead?


 Regards,
 Arnout

-- 
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

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

end of thread, other threads:[~2016-01-25  0:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30 21:12 [Buildroot] [RFC 1/2] non-versioned packages Alex Suykov
2015-09-30 21:13 ` [Buildroot] [RFC 2/2] remove download suppression from mke2img and skeleton Alex Suykov
2016-01-19 22:33   ` Yann E. MORIN
2016-01-20 14:14     ` Thomas De Schampheleire
2016-01-25  0:16       ` Arnout Vandecappelle
2015-09-30 22:15 ` [Buildroot] [RFC 1/2] non-versioned packages Yann E. MORIN
2015-09-30 22:52   ` Alex Suykov
2015-10-15 20:41 ` Thomas Petazzoni
2015-10-15 22:31   ` Arnout Vandecappelle
2016-01-19 22:32 ` Yann E. MORIN
2016-01-24 22:33   ` Alex Suykov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.