On 11 October 2014 11:33, Hongxu Jia <[email protected]> wrote:
>
> Here is my patch, and it could not work, I think we are doing
> the same thing:
>
> --- a/libopkg/opkg_remove.c
> +++ b/libopkg/opkg_remove.c
> @@ -118,8 +118,11 @@ opkg_remove_dependent_pkgs(pkg_t *pkg, abstract_pkg_t
> **dependents)
>              for (a = 0; a < dep_ab_pkg->pkgs->len; a++) {
>                  pkg_t *dep_pkg = dep_ab_pkg->pkgs->pkgs[a];
>                  if (dep_pkg->state_status == SS_INSTALLED) {
> -                    pkg_vec_insert(dependent_pkgs, dep_pkg);
> -                    count++;
> +                    if (!pkg_vec_contains(dependent_pkgs, dep_pkg))
> +                    {
> +                        pkg_vec_insert(dependent_pkgs, dep_pkg);
> +                        count++;
> +                    }
>
> //Hongxu

My assumption was that duplicates were only being added during a
single call to opkg_remove_dependent_pkgs, as on subsequent calls a
package will no longer have state_status == SS_INSTALLED if it has
already been removed. If my assumption is wrong, your original patch
looks to be the best solution.

Thanks,

-- 
Paul Barker

Email: [email protected]
http://www.paulbarker.me.uk
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to