[OE-core] [PATCH] Better support for upgrading packages in opkg and update-rc.d.bbclass

Paul Barker paul at paulbarker.me.uk
Mon Oct 13 10:08:09 UTC 2014


On 13 October 2014 06:23, Peter Urbanec <openembedded-devel at urbanec.net> wrote:
> On 12/10/14 06:17, Paul Barker wrote:
>>
>> opkg_remove_pkg is never called with from_upgrade set to a non-zero
>> value. The removal of an old package during an upgrade is handled by
>> directly calling remove_data_files_and_list and
>> remove_maintainer_scripts from opkg_install_pkg. The desired behaviour
>> is given in the comments in prerm_upgrade_old_pkg in opkg_install.c,
>> the behaviour given by the comment in that function just needs
>> implementing.
>
>
> Indeed, I got fooled by looking at the call to opkg_install_pkg(pkg, 1)

No worries, there's still a lot of confusing code in opkg I need to
clean up. I've got a patch ready which will remove the second argument
to opkg_remove_pkg to prevent similar confusion in the future.

>
>> This is already entered as issue 104 in the opkg issue tracker:
>> https://code.google.com/p/opkg/issues/detail?id=104
>
>
> So it is. Slightly more work than my trivial opkg patch, but then again, my
> trivial opkg patch is not much use ;-) Please disregard it.
>
>> Have you tested this patch before submitting it?
>
>
> To be honest, I have not tested the opkg "upgrade" patch in isolation. I
> have tested the opkg patch for multiple package upgrade case together with
> my changes to update-rc.d.bbclass changes (i.e. the entire patch I posted to
> the oe-core list) and this has solved the problems that I encountered
> initially. The "fix" for my use case is due to the changes in the way the
> prerm, postrm and postinst scripts work, but reviewing those changes, that's
> not good enough either.
>
> Thanks for the review.
>
> I'll try again later...

I decided to go ahead and implement the required function yesterday as
it's on my todo list for the v0.3.0 release. I'll forward you the
patch once it's been briefly tested, it should apply fairly cleanly to
v0.2.2 or v0.2.3 and so it should be possible to apply it within
OpenEmbedded if you don't want to wait for the v0.3.0 release.

>
> Peter

Thanks,

-- 
Paul Barker

Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk



More information about the Openembedded-core mailing list