[v2,1/1] pkg-infra/show-info: dump install_{staging, target} info
diff mbox series

Message ID 20190723125657.27702-1-vadim4j@gmail.com
State Changes Requested
Headers show
Series
  • [v2,1/1] pkg-infra/show-info: dump install_{staging, target} info
Related show

Commit Message

Vadim Kochan July 23, 2019, 12:56 p.m. UTC
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

 package/pkg-utils.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Carlos Santos July 27, 2019, 2:40 a.m. UTC | #1
On Tue, Jul 23, 2019 at 9:57 AM Vadim Kochan <vadim4j@gmail.com> 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
>
>  package/pkg-utils.mk | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index b7280e930f..1dcf2805cb 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 $($(1)_INSTALL_TARGET),true,false),

This tests if if $($(1)_INSTALL_TARGET is not empty, e.g.

$ fgrep '_INSTALL_TARGET =' package/*/*.mk
package/azmq/azmq.mk:AZMQ_INSTALL_TARGET = NO
[...]

$ make azmq-show-info
{ "azmq": { "type": "target", "virtual": false, "version": "1.0.2",
"licenses": "BSL-1.0", "install-target": true, "install-staging":
true, "downloads": [ { "source": "azmq-1.0.2.tar.gz", "uris": [
"https+https}

> +       "install-staging": $(if $($(1)_INSTALL_STAGING),true,false),

$ make bash-show-info
{ "bash": { "type": "target", "virtual": false, "version": "4.4.18",
"licenses": "GPL-3.0+", "install-target": true, "install-staging":
true, "downloads": [ { "source": "bash-4.4.18.tar.gz", "uris": [
"http+htt}
Vadim Kochan July 28, 2019, 9:48 a.m. UTC | #2
Hi Carlos,

On Sat, Jul 27, 2019 at 5:40 AM Carlos Santos <unixmania@gmail.com> wrote:
>
> On Tue, Jul 23, 2019 at 9:57 AM Vadim Kochan <vadim4j@gmail.com> 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
> >
> >  package/pkg-utils.mk | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> > index b7280e930f..1dcf2805cb 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 $($(1)_INSTALL_TARGET),true,false),
>
> This tests if if $($(1)_INSTALL_TARGET is not empty, e.g.
>
> $ fgrep '_INSTALL_TARGET =' package/*/*.mk
> package/azmq/azmq.mk:AZMQ_INSTALL_TARGET = NO
> [...]
>
> $ make azmq-show-info
> { "azmq": { "type": "target", "virtual": false, "version": "1.0.2",
> "licenses": "BSL-1.0", "install-target": true, "install-staging":
> true, "downloads": [ { "source": "azmq-1.0.2.tar.gz", "uris": [
> "https+https}
>
> > +       "install-staging": $(if $($(1)_INSTALL_STAGING),true,false),
>
> $ make bash-show-info
> { "bash": { "type": "target", "virtual": false, "version": "4.4.18",
> "licenses": "GPL-3.0+", "install-target": true, "install-staging":
> true, "downloads": [ { "source": "bash-4.4.18.tar.gz", "uris": [
> "http+htt}
>
> --
> Carlos Santos <unixmania@gmail.com>

Thanks a lot for this, and sorry for waste your time :(
Somehow I messed YES with true :(

Regards,
Vadim Kochan

Patch
diff mbox series

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index b7280e930f..1dcf2805cb 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 $($(1)_INSTALL_TARGET),true,false),
+	"install-staging": $(if $($(1)_INSTALL_STAGING),true,false),
 	"downloads": [
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
 		{