<?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>11096</bug_id>
          
          <creation_ts>2017-02-22 19:27:50 +0000</creation_ts>
          <short_desc>improve  pkg_postinst handling: script errors should be properly reported</short_desc>
          <delta_ts>2018-01-31 10:16:52 +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>OE-Core</product>
          <component>deployment</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=9261</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          <dependson>9675</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Kanavin">alex.kanavin</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>jose.perez.carranza</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70885</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-02-22 19:27:50 +0000</bug_when>
    <thetext>Currently if anything goes wrong in pkg_postinst() script, the problem is swept under a carpet in two ways:
1) scripts are not run using sh -e, so only the if the last command in a script fails, the script fails.
2) even if the script does fail, it&apos;s taken as a request to defer the script execution to first boot of the image, which may mask a problem or a regression somewhere. Deferral to first boot needs to be requested explicitly by calling a &apos;hook&apos; command from the script.

I&apos;ve done some work to address this here, needs to be completed:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4-postinst-fix

Discussion:
http://lists.openembedded.org/pipermail/openembedded-architecture/2017-February/000422.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78062</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-11-08 16:23:09 +0000</bug_when>
    <thetext>Related to https://bugzilla.yoctoproject.org/show_bug.cgi?id=9261</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79282</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2018-01-31 10:16:52 +0000</bug_when>
    <thetext>Patchset merged to master:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146895.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>