* [Buildroot] [PATCH v3 1/1] pkg-infra/show-info: dump install_{staging, target} info
@ 2019-07-31 15:32 Vadim Kochan
2019-08-02 20:42 ` Arnout Vandecappelle
0 siblings, 1 reply; 5+ messages in thread
From: Vadim Kochan @ 2019-07-31 15:32 UTC (permalink / raw)
To: buildroot
provide info if the package will be installed to staging/target
destinations. Might be useful for analyzing the packages which
installed only for target/staging.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
---
v2:
1) use oneliner 'if' to dump install_{staging,target} properties
v3:
1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)
package/pkg-utils.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index b7280e930f..ffe198e242 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -94,6 +94,8 @@ endef
define _json-info-pkg-details
"version": "$($(1)_DL_VERSION)",
"licenses": "$($(1)_LICENSE)",
+ "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false),
+ "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),
"downloads": [
$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
{
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 1/1] pkg-infra/show-info: dump install_{staging, target} info
2019-07-31 15:32 [Buildroot] [PATCH v3 1/1] pkg-infra/show-info: dump install_{staging, target} info Vadim Kochan
@ 2019-08-02 20:42 ` Arnout Vandecappelle
2019-08-02 20:43 ` Arnout Vandecappelle
0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-08-02 20:42 UTC (permalink / raw)
To: buildroot
Hi Vadim,
Sorry to come with yet another comment in v3 of this extremely simple patch :-)
On 31/07/2019 17:32, Vadim Kochan wrote:
> provide info if the package will be installed to staging/target
> destinations. Might be useful for analyzing the packages which
> installed only for target/staging.
>
> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
> ---
> v2:
> 1) use oneliner 'if' to dump install_{staging,target} properties
>
> v3:
> 1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)
>
> package/pkg-utils.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index b7280e930f..ffe198e242 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -94,6 +94,8 @@ endef
> define _json-info-pkg-details
> "version": "$($(1)_DL_VERSION)",
> "licenses": "$($(1)_LICENSE)",
> + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false),
> + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),
I still find this ugly.
Could you instead add a macro that does something like
$(subst NO,false,$(subst YES,true,$(1)))
and use that?
It may also be handy in other situations.
I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
Regards,
Arnout
> "downloads": [
> $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
> {
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 1/1] pkg-infra/show-info: dump install_{staging, target} info
2019-08-02 20:42 ` Arnout Vandecappelle
@ 2019-08-02 20:43 ` Arnout Vandecappelle
2019-08-03 6:32 ` Yann E. MORIN
0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-08-02 20:43 UTC (permalink / raw)
To: buildroot
On 02/08/2019 22:42, Arnout Vandecappelle wrote:
> Hi Vadim,
>
> Sorry to come with yet another comment in v3 of this extremely simple patch :-)
>
> On 31/07/2019 17:32, Vadim Kochan wrote:
>> provide info if the package will be installed to staging/target
>> destinations. Might be useful for analyzing the packages which
>> installed only for target/staging.
>>
>> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
>> ---
>> v2:
>> 1) use oneliner 'if' to dump install_{staging,target} properties
>>
>> v3:
>> 1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)
>>
>> package/pkg-utils.mk | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
>> index b7280e930f..ffe198e242 100644
>> --- a/package/pkg-utils.mk
>> +++ b/package/pkg-utils.mk
>> @@ -94,6 +94,8 @@ endef
>> define _json-info-pkg-details
>> "version": "$($(1)_DL_VERSION)",
>> "licenses": "$($(1)_LICENSE)",
>> + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false),
>> + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),
Oh, also, someone commented that you should keep install_staging with
underscore because we already have reverse_dependencies.
Regards,
Arnout
>
> I still find this ugly.
>
> Could you instead add a macro that does something like
> $(subst NO,false,$(subst YES,true,$(1)))
> and use that?
>
> It may also be handy in other situations.
>
> I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
>
> Regards,
> Arnout
>
>> "downloads": [
>> $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
>> {
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 1/1] pkg-infra/show-info: dump install_{staging, target} info
2019-08-02 20:43 ` Arnout Vandecappelle
@ 2019-08-03 6:32 ` Yann E. MORIN
2019-08-06 8:51 ` Vadim Kochan
0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2019-08-03 6:32 UTC (permalink / raw)
To: buildroot
Arnout, Vadim, All,
On 2019-08-02 22:43 +0200, Arnout Vandecappelle spake thusly:
> On 02/08/2019 22:42, Arnout Vandecappelle wrote:
> > On 31/07/2019 17:32, Vadim Kochan wrote:
> >> provide info if the package will be installed to staging/target
> >> destinations. Might be useful for analyzing the packages which
> >> installed only for target/staging.
> >>
> >> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
> >> ---
> >> v2:
> >> 1) use oneliner 'if' to dump install_{staging,target} properties
> >>
> >> v3:
> >> 1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)
> >>
> >> package/pkg-utils.mk | 2 ++
> >> 1 file changed, 2 insertions(+)
> >>
> >> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> >> index b7280e930f..ffe198e242 100644
> >> --- a/package/pkg-utils.mk
> >> +++ b/package/pkg-utils.mk
> >> @@ -94,6 +94,8 @@ endef
> >> define _json-info-pkg-details
> >> "version": "$($(1)_DL_VERSION)",
> >> "licenses": "$($(1)_LICENSE)",
> >> + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false),
> >> + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),
>
> Oh, also, someone commented that you should keep install_staging with
> underscore because we already have reverse_dependencies.
And install_target too, of course.
And please also introduce install_images.
Regards,
Yann E. MORIN.
> Regards,
> Arnout
>
> >
> > I still find this ugly.
> >
> > Could you instead add a macro that does something like
> > $(subst NO,false,$(subst YES,true,$(1)))
> > and use that?
> >
> > It may also be handy in other situations.
> >
> > I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
> >
> > Regards,
> > Arnout
> >
> >> "downloads": [
> >> $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
> >> {
> >>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v3 1/1] pkg-infra/show-info: dump install_{staging, target} info
2019-08-03 6:32 ` Yann E. MORIN
@ 2019-08-06 8:51 ` Vadim Kochan
0 siblings, 0 replies; 5+ messages in thread
From: Vadim Kochan @ 2019-08-06 8:51 UTC (permalink / raw)
To: buildroot
Arnout, Yann, All
On Sat, Aug 3, 2019 at 9:32 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Arnout, Vadim, All,
>
> On 2019-08-02 22:43 +0200, Arnout Vandecappelle spake thusly:
> > On 02/08/2019 22:42, Arnout Vandecappelle wrote:
> > > On 31/07/2019 17:32, Vadim Kochan wrote:
> > >> provide info if the package will be installed to staging/target
> > >> destinations. Might be useful for analyzing the packages which
> > >> installed only for target/staging.
> > >>
> > >> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
> > >> ---
> > >> v2:
> > >> 1) use oneliner 'if' to dump install_{staging,target} properties
> > >>
> > >> v3:
> > >> 1) fix evaluation of true/false value via 'subst' (suggested by Yann E. Morin)
> > >>
> > >> package/pkg-utils.mk | 2 ++
> > >> 1 file changed, 2 insertions(+)
> > >>
> > >> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> > >> index b7280e930f..ffe198e242 100644
> > >> --- a/package/pkg-utils.mk
> > >> +++ b/package/pkg-utils.mk
> > >> @@ -94,6 +94,8 @@ endef
> > >> define _json-info-pkg-details
> > >> "version": "$($(1)_DL_VERSION)",
> > >> "licenses": "$($(1)_LICENSE)",
> > >> + "install-target": $(if $(subst NO,,$($(1)_INSTALL_TARGET)),true,false),
> > >> + "install-staging": $(if $(subst NO,,$($(1)_INSTALL_STAGING)),true,false),
> >
> > Oh, also, someone commented that you should keep install_staging with
> > underscore because we already have reverse_dependencies.
>
> And install_target too, of course.
>
> And please also introduce install_images.
>
> Regards,
> Yann E. MORIN.
>
> > Regards,
> > Arnout
> >
> > >
> > > I still find this ugly.
> > >
> > > Could you instead add a macro that does something like
> > > $(subst NO,false,$(subst YES,true,$(1)))
> > > and use that?
> > >
> > > It may also be handy in other situations.
> > >
> > > I'm not sure what to call it, maybe bool-to-json or yesno-to-bool
> > >
> > > Regards,
> > > Arnout
> > >
> > >> "downloads": [
> > >> $(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
> > >> {
> > >>
>
> --
Thanks for the comments, will do it.
Regards,
Vadim Kochan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-08-06 8:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-31 15:32 [Buildroot] [PATCH v3 1/1] pkg-infra/show-info: dump install_{staging, target} info Vadim Kochan
2019-08-02 20:42 ` Arnout Vandecappelle
2019-08-02 20:43 ` Arnout Vandecappelle
2019-08-03 6:32 ` Yann E. MORIN
2019-08-06 8:51 ` Vadim Kochan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox