Bug 1760 - rpm upgrades fail for recipes using update-alternatives
Summary: rpm upgrades fail for recipes using update-alternatives
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: All Multiple
: Undecided major
Target Milestone: 1.2
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard: Fix merged (10 Nov)
Depends on:
Blocks:
 
Reported: 2011-11-08 08:20 UTC by Paul Eggleton
Modified: 2011-11-10 07:22 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2011-11-08 08:20:48 UTC
If a recipe uses update-alternatives in postinst/prerm, this will cause failures with rpm packaging during upgrade as we expect (based on assumptions from opkg) that prerm/postrm occur after postinst. For an example see the original report on the mailing list:

https://lists.yoctoproject.org/pipermail/yocto/2011-November/005559.html

Mark Hatle has suggested using guard wrappers for the prerm/postrm scripts within package_rpm.bbclass that check the calling argument - rpm specifies how many versions of the package are still installed; if the answer is not 0 then according to the behaviour of opkg in this situation we should be able to skip all prerm/postrm scripts, although careful examination of all of these scripts as well as ones in meta-oe should be done to ensure this won't cause any issues.
Comment 1 Paul Eggleton 2011-11-10 07:22:53 UTC
Fixed merged in revision 7b645cac3f7e89c20918e83d61352ccc5f8b63be.