<?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>8273</bug_id>
          
          <creation_ts>2015-09-09 19:41:51 +0000</creation_ts>
          <short_desc>openjade-native doesn&apos;t remove from sysroot correctly</short_desc>
          <delta_ts>2016-09-19 12:41:57 +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>devtools / tool chain</component>
          <version>1.9</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>53893</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-09-09 19:41:51 +0000</bug_when>
    <thetext>If in a build it is determined that openjade-native needs to be rebuilt it is removed from the sysroot but the catalog in /etc/sgml/sgml-catalog isn&apos;t updated to remove the references so the sgml-common-native postinstall fails:

| DEBUG: Staging files from /data/poky-master/tmp/work/x86_64-linux/sgml-common-native/0.6.3-r1/sysroot-destdir/data/poky-master/tmp/sysroots/x86_64-linux to /data/poky-master/tmp/sysroots/x86_64-linux
| DEBUG: Executing shell function sgml_common_sstate_postinst
| install-catalog: addition of /data/poky-master/tmp/sysroots/x86_64-linux/etc/sgml/sgml-ent.cat in /data/poky-master/tmp/sysroots/x86_64-linux/etc/sgml/sgml-docbook.cat
| Warning: /data/poky-master/tmp/sysroots/x86_64-linux/etc/sgml/sgml-ent.cat is already installed in the centralized catalog /data/poky-master/tmp/sysroots/x86_64-linux/etc/sgml/sgml-docbook.cat
| install-catalog: addition of /data/poky-master/tmp/sysroots/x86_64-linux/etc/sgml/sgml-docbook.cat in /data/poky-master/tmp/sysroots/x86_64-linux/etc/sgml/catalog
| install-catalog: &quot;/data/poky-master/tmp/sysroots/x86_64-linux/etc/sgml/openjade-1.3.2.cat&quot; does not exist or is empty.
| WARNING: exit code 2 from a shell command.
| DEBUG: Python function sstate_task_postfunc finished
| ERROR: Function failed: sgml_common_sstate_postinst (log file is located at /data/poky-master/tmp/work/x86_64-linux/sgml-common-native/0.6.3-r1/temp/log.do_populate_sysroot.24001)
ERROR: Task 55 (/home/ross/Yocto/poky/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb, do_populate_sysroot) failed with exit code &apos;1&apos;

openjade-native has a CLEANFUNC but clearly this isn&apos;t being executed correctly or at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63571</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-01 11:00:57 +0000</bug_when>
    <thetext>Reassigning to Alex, I think this might end up needing to be solved as part of gtk-doc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63658</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-07-05 18:24:57 +0000</bug_when>
    <thetext>What happens here is that sstate.bbclass is removing all the files installed by the recipe, but does not execute CLEANFUNCS (which would, if executed, update the sgml catalog so that it does not anymore refer to deleted files). Then, the catalog continues to refer to a deleted file, and the build breaks down.

CLEANFUNCS is only executed via do_clean, and I don&apos;t know how to force its execution prior to building a package. Hints?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63659</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-07-05 20:29:02 +0000</bug_when>
    <thetext>The code that does file removal was added in ccb2d1b481c0fba69c06a0c0f2553e2a45ee937a, so reassigning to Richard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63666</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-07-06 09:39:21 +0000</bug_when>
    <thetext>How to reproduce: bump the PR in sgml-common (not sgml-common-native as it gets overriden) and openjade-native to force the sysroot cleaning of openjade-native and building of sgml-common-native. Then build sgml-common-native, and it will fail - because openjade catalog was removed, but index was not updated.

Potential fix (from chat with RP): to write an rm file alongside the manifest and execute that at manifest uninstall time. Cleaning sysroots is not done in context of single recipes, and so hooking into them (for purposes of executing CLEANFUNCS defined there) might be tricky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65783</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-09-03 02:46:57 +0000</bug_when>
    <thetext>*** Bug 10202 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65800</commentid>
    <comment_count>6</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-09-05 11:44:36 +0000</bug_when>
    <thetext>Another &apos;solution&apos; is to drop the SGML stack entirely. I&apos;ll investigate who is using it and for what, I have a gut feeling it&apos;s more or less obsoleted by XML. That has certainly happened in gtk-doc, which nowadays supports XML only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66194</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-09-15 11:21:27 +0000</bug_when>
    <thetext>I&apos;d be happy to see the sgml stuff dropped, in the meantime, I was able to fix this rebuild issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66309</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-09-19 12:41:57 +0000</bug_when>
    <thetext>Fixed in oe-core cdae3e76232110903d124195b036e4e70fb28aa4.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>