<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>1760</bug_id>
          
          <creation_ts>2011-11-08 08:20:48 +0000</creation_ts>
          <short_desc>rpm upgrades fail for recipes using update-alternatives</short_desc>
          <delta_ts>2011-11-10 07:22:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Fix merged (10 Nov)</status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>17151</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2011-11-08 08:20:48 +0000</bug_when>
    <thetext>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&apos;t cause any issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17177</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2011-11-10 07:22:53 +0000</bug_when>
    <thetext>Fixed merged in revision 7b645cac3f7e89c20918e83d61352ccc5f8b63be.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>