[OE-core] [PATCH 1/1] opkg: fix remove pkg with --force-removal-of-dependent-packages failed
Paul Barker
paul at paulbarker.me.uk
Tue Oct 21 16:17:20 UTC 2014
On 11 October 2014 11:37, Paul Barker <paul at paulbarker.me.uk> wrote:
> On 11 October 2014 11:33, Hongxu Jia <hongxu.jia at windriver.com> 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.
>
Hongxu's original patch applies correctly upstream and passes the opkg
test suite. I'll merge this onto the opkg-0.2.x branch and so we can
change Upstream-status to 'Backport'.
Acked-by: Paul Barker <paul at paulbarker.me.uk>
Thanks,
--
Paul Barker
Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk
More information about the Openembedded-core
mailing list