Re: [yocto] [OE-core] [PATCH 1/3] opkg: add --ignore-recommends flag

2019-02-07 Thread Scott Rifenbark
On Thu, Feb 7, 2019 at 9:44 AM Alejandro Del Castillo <
alejandro.delcasti...@ni.com> wrote:

>
>
> On 2/7/19 11:36 AM, Scott Rifenbark wrote:
> > This change looks like it impacts documentation (i.e.
> >
> https://yoctoproject.org/docs/2.7/ref-manual/ref-manual.html#var-BAD_RECOMMENDATIONS.
>
> > When will this change go into effect?
>
> I believe it doesn't. It is refactoring the opkg implementation to
> leverage a new opkg feature (--add-ignore-recommends), which is a more
> robust implementation. Should be transparent to users.
>

Thank you for the clarification... I thought it might be a user option.


> > On Thu, Feb 7, 2019 at 7:58 AM Alejandro del Castillo
> > mailto:alejandro.delcasti...@ni.com>>
> wrote:
> >
> > To be used for BAD_RECOMMENDATIONS feature.
> >
> > Signed-off-by: Alejandro del Castillo  > >
> > ---
> >   ...pkg-add-add-ignore-recommends-option.patch | 259
> ++
> >   meta/recipes-devtools/opkg/opkg_0.4.0.bb
> > <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__opkg-5F0.4.0.bb=DwMFaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=8hd_9vew95YIf_VIv2QHNu2EFnc3G2WZ5KA2Upnv5j8=JvgzuAyAoVrkeSZAdWZUuIsFWQ8okApbCk1iiF13CDc=>
>
> >  |   1 +
> >   2 files changed, 260 insertions(+)
> >   create mode 100644
> >
>  
> meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> >
> > diff --git
> >
>  
> a/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> >
>  
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> > new file mode 100644
> > index 00..47d1b3c37e
> > --- /dev/null
> > +++
> >
>  
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> > @@ -0,0 +1,259 @@
> > +From 64aa98646a17c299bf37af2975b98daf5d7d30b4 Mon Sep 17 00:00:00
> 2001
> > +From: Alejandro del Castillo  > >
> > +Date: Thu, 31 Jan 2019 18:16:08 -0600
> > +Subject: [PATCH] libopkg: add --add-ignore-recommends option
> > +
> > +Add option to ignore specific recommended packages. On the libsolv
> > +backed, this feature will only work on libsolv version > 0.7.2 [1].
> > +
> > +[1]
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openSUSE_libsolv_issues_254=DwIBaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=GObNHzFJpWpf_PripIrf-K2RhsktYdAUEieAJexXOKw=3G-meChUqClFggFPqsrAxIZBfLnRKIHm62Uuy1X6nQQ=
> > +
> > +Signed-off-by: Alejandro del Castillo  > >
> > +
> > +Upstream-Status: Accepted
> > +---
> > + libopkg/opkg_conf.c   |  2 +
> > + libopkg/opkg_conf.h   |  1 +
> > + .../solvers/internal/pkg_depends_internal.c   |  3 +-
> > + libopkg/solvers/libsolv/opkg_solver_libsolv.c | 21 ++-
> > + man/opkg.1.in
> > <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__opkg.1.in=DwMFaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=8hd_9vew95YIf_VIv2QHNu2EFnc3G2WZ5KA2Upnv5j8=8yIWRVT6JV0YnkHzVgeo8pAkiFPM4xz8y9APvxobmhY=>
>
> > |  3 +
> > + src/opkg.c|  6 ++
> > + tests/Makefile|  1 +
> > + tests/core/43_add_ignore_recommends.py| 62
> +++
> > + 8 files changed, 97 insertions(+), 2 deletions(-)
> > + create mode 100755 tests/core/43_add_ignore_recommends.py
> > +
> > +diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
> > +index 06880a1..f2330cd 100644
> > +--- a/libopkg/opkg_conf.c
> >  b/libopkg/opkg_conf.c
> > +@@ -597,6 +597,7 @@ int opkg_conf_init(void)
> > + pkg_dest_list_init(_config->tmp_dest_list);
> > + nv_pair_list_init(_config->arch_list);
> > + str_list_init(_config->exclude_list);
> > ++str_list_init(_config->ignore_recommends_list);
> > +
> > + return 0;
> > + }
> > +@@ -938,6 +939,7 @@ void opkg_conf_deinit(void)
> > + pkg_dest_list_deinit(_config->pkg_dest_list);
> > + nv_pair_list_deinit(_config->arch_list);
> > + str_list_deinit(_config->exclude_list);
> > ++str_list_deinit(_config->ignore_recommends_list);
> > +
> > + if (opkg_config->verbosity >= DEBUG) {
> > + hash_print_stats(_config->pkg_hash);
> > +diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
> > +index eb56a29..316c500 100644
> > +--- a/libopkg/opkg_conf.h
> >  b/libopkg/opkg_conf.h
> > +@@ -61,6 +61,7 @@ typedef struct opkg_conf {
> > + pkg_dest_list_t tmp_dest_list;
> > + nv_pair_list_t arch_list;
> > + 

Re: [yocto] [OE-core] [PATCH 1/3] opkg: add --ignore-recommends flag

2019-02-07 Thread Alejandro Del Castillo


On 2/7/19 11:36 AM, Scott Rifenbark wrote:
> This change looks like it impacts documentation (i.e. 
> https://yoctoproject.org/docs/2.7/ref-manual/ref-manual.html#var-BAD_RECOMMENDATIONS.
>   
> When will this change go into effect? 

I believe it doesn't. It is refactoring the opkg implementation to 
leverage a new opkg feature (--add-ignore-recommends), which is a more 
robust implementation. Should be transparent to users.

> On Thu, Feb 7, 2019 at 7:58 AM Alejandro del Castillo 
> mailto:alejandro.delcasti...@ni.com>> wrote:
> 
> To be used for BAD_RECOMMENDATIONS feature.
> 
> Signed-off-by: Alejandro del Castillo  >
> ---
>   ...pkg-add-add-ignore-recommends-option.patch | 259 ++
>   meta/recipes-devtools/opkg/opkg_0.4.0.bb
> 
> 
>  
>      |   1 +
>   2 files changed, 260 insertions(+)
>   create mode 100644
> 
> meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> 
> diff --git
> 
> a/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> 
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> new file mode 100644
> index 00..47d1b3c37e
> --- /dev/null
> +++
> 
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> @@ -0,0 +1,259 @@
> +From 64aa98646a17c299bf37af2975b98daf5d7d30b4 Mon Sep 17 00:00:00 2001
> +From: Alejandro del Castillo  >
> +Date: Thu, 31 Jan 2019 18:16:08 -0600
> +Subject: [PATCH] libopkg: add --add-ignore-recommends option
> +
> +Add option to ignore specific recommended packages. On the libsolv
> +backed, this feature will only work on libsolv version > 0.7.2 [1].
> +
> +[1]
> 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openSUSE_libsolv_issues_254=DwIBaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=GObNHzFJpWpf_PripIrf-K2RhsktYdAUEieAJexXOKw=3G-meChUqClFggFPqsrAxIZBfLnRKIHm62Uuy1X6nQQ=
> +
> +Signed-off-by: Alejandro del Castillo  >
> +
> +Upstream-Status: Accepted
> +---
> + libopkg/opkg_conf.c                           |  2 +
> + libopkg/opkg_conf.h                           |  1 +
> + .../solvers/internal/pkg_depends_internal.c   |  3 +-
> + libopkg/solvers/libsolv/opkg_solver_libsolv.c | 21 ++-
> + man/opkg.1.in
> 
> 
>  
>                                 |  3 +
> + src/opkg.c                                    |  6 ++
> + tests/Makefile                                |  1 +
> + tests/core/43_add_ignore_recommends.py        | 62 +++
> + 8 files changed, 97 insertions(+), 2 deletions(-)
> + create mode 100755 tests/core/43_add_ignore_recommends.py
> +
> +diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
> +index 06880a1..f2330cd 100644
> +--- a/libopkg/opkg_conf.c
>  b/libopkg/opkg_conf.c
> +@@ -597,6 +597,7 @@ int opkg_conf_init(void)
> +     pkg_dest_list_init(_config->tmp_dest_list);
> +     nv_pair_list_init(_config->arch_list);
> +     str_list_init(_config->exclude_list);
> ++    str_list_init(_config->ignore_recommends_list);
> +
> +     return 0;
> + }
> +@@ -938,6 +939,7 @@ void opkg_conf_deinit(void)
> +     pkg_dest_list_deinit(_config->pkg_dest_list);
> +     nv_pair_list_deinit(_config->arch_list);
> +     str_list_deinit(_config->exclude_list);
> ++    str_list_deinit(_config->ignore_recommends_list);
> +
> +     if (opkg_config->verbosity >= DEBUG) {
> +         hash_print_stats(_config->pkg_hash);
> +diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
> +index eb56a29..316c500 100644
> +--- a/libopkg/opkg_conf.h
>  b/libopkg/opkg_conf.h
> +@@ -61,6 +61,7 @@ typedef struct opkg_conf {
> +     pkg_dest_list_t tmp_dest_list;
> +     nv_pair_list_t arch_list;
> +     str_list_t exclude_list;
> ++    str_list_t ignore_recommends_list;
> +
> +     int restrict_to_default_dest;
> +     pkg_dest_t *default_dest;
> +diff --git a/libopkg/solvers/internal/pkg_depends_internal.c
> b/libopkg/solvers/internal/pkg_depends_internal.c
> +index cd56d84..5deee70 100644
> +--- 

Re: [yocto] [OE-core] [PATCH 1/3] opkg: add --ignore-recommends flag

2019-02-07 Thread Scott Rifenbark
This change looks like it impacts documentation (i.e.
https://yoctoproject.org/docs/2.7/ref-manual/ref-manual.html#var-BAD_RECOMMENDATIONS).
When will this change go into effect?

Scott

On Thu, Feb 7, 2019 at 7:58 AM Alejandro del Castillo <
alejandro.delcasti...@ni.com> wrote:

> To be used for BAD_RECOMMENDATIONS feature.
>
> Signed-off-by: Alejandro del Castillo 
> ---
>  ...pkg-add-add-ignore-recommends-option.patch | 259 ++
>  meta/recipes-devtools/opkg/opkg_0.4.0.bb  |   1 +
>  2 files changed, 260 insertions(+)
>  create mode 100644
> meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
>
> diff --git
> a/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> new file mode 100644
> index 00..47d1b3c37e
> --- /dev/null
> +++
> b/meta/recipes-devtools/opkg/opkg/0001-libopkg-add-add-ignore-recommends-option.patch
> @@ -0,0 +1,259 @@
> +From 64aa98646a17c299bf37af2975b98daf5d7d30b4 Mon Sep 17 00:00:00 2001
> +From: Alejandro del Castillo 
> +Date: Thu, 31 Jan 2019 18:16:08 -0600
> +Subject: [PATCH] libopkg: add --add-ignore-recommends option
> +
> +Add option to ignore specific recommended packages. On the libsolv
> +backed, this feature will only work on libsolv version > 0.7.2 [1].
> +
> +[1]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openSUSE_libsolv_issues_254=DwIBaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ=GObNHzFJpWpf_PripIrf-K2RhsktYdAUEieAJexXOKw=3G-meChUqClFggFPqsrAxIZBfLnRKIHm62Uuy1X6nQQ=
> +
> +Signed-off-by: Alejandro del Castillo 
> +
> +Upstream-Status: Accepted
> +---
> + libopkg/opkg_conf.c   |  2 +
> + libopkg/opkg_conf.h   |  1 +
> + .../solvers/internal/pkg_depends_internal.c   |  3 +-
> + libopkg/solvers/libsolv/opkg_solver_libsolv.c | 21 ++-
> + man/opkg.1.in |  3 +
> + src/opkg.c|  6 ++
> + tests/Makefile|  1 +
> + tests/core/43_add_ignore_recommends.py| 62 +++
> + 8 files changed, 97 insertions(+), 2 deletions(-)
> + create mode 100755 tests/core/43_add_ignore_recommends.py
> +
> +diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
> +index 06880a1..f2330cd 100644
> +--- a/libopkg/opkg_conf.c
>  b/libopkg/opkg_conf.c
> +@@ -597,6 +597,7 @@ int opkg_conf_init(void)
> + pkg_dest_list_init(_config->tmp_dest_list);
> + nv_pair_list_init(_config->arch_list);
> + str_list_init(_config->exclude_list);
> ++str_list_init(_config->ignore_recommends_list);
> +
> + return 0;
> + }
> +@@ -938,6 +939,7 @@ void opkg_conf_deinit(void)
> + pkg_dest_list_deinit(_config->pkg_dest_list);
> + nv_pair_list_deinit(_config->arch_list);
> + str_list_deinit(_config->exclude_list);
> ++str_list_deinit(_config->ignore_recommends_list);
> +
> + if (opkg_config->verbosity >= DEBUG) {
> + hash_print_stats(_config->pkg_hash);
> +diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h
> +index eb56a29..316c500 100644
> +--- a/libopkg/opkg_conf.h
>  b/libopkg/opkg_conf.h
> +@@ -61,6 +61,7 @@ typedef struct opkg_conf {
> + pkg_dest_list_t tmp_dest_list;
> + nv_pair_list_t arch_list;
> + str_list_t exclude_list;
> ++str_list_t ignore_recommends_list;
> +
> + int restrict_to_default_dest;
> + pkg_dest_t *default_dest;
> +diff --git a/libopkg/solvers/internal/pkg_depends_internal.c
> b/libopkg/solvers/internal/pkg_depends_internal.c
> +index cd56d84..5deee70 100644
> +--- a/libopkg/solvers/internal/pkg_depends_internal.c
>  b/libopkg/solvers/internal/pkg_depends_internal.c
> +@@ -228,7 +228,8 @@ int pkg_hash_fetch_unsatisfied_dependencies(pkg_t
> *pkg,
> + || compound_depend->type == SUGGEST)
> + && (satisfying_pkg->state_want == SW_DEINSTALL
> + || satisfying_pkg->state_want == SW_PURGE
> +-|| opkg_config->no_install_recommends);
> ++|| opkg_config->no_install_recommends
> ++||
> str_list_contains(_config->ignore_recommends_list,
> satisfying_pkg->name));
> + if (ignore) {
> + opkg_msg(NOTICE,
> +  "%s: ignoring recommendation for "
> +diff --git a/libopkg/solvers/libsolv/opkg_solver_libsolv.c
> b/libopkg/solvers/libsolv/opkg_solver_libsolv.c
> +index 2b27e3a..403e07b 100644
> +--- a/libopkg/solvers/libsolv/opkg_solver_libsolv.c
>  b/libopkg/solvers/libsolv/opkg_solver_libsolv.c
> +@@ -484,6 +484,7 @@ static void pkg2solvable(pkg_t *pkg, Solvable
> *solvable_out)
> + static void populate_installed_repo(libsolv_solver_t *libsolv_solver)
> + {
> + int i;
> ++Id what;
> +
> +