<?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>1250</bug_id>
          
          <creation_ts>2011-07-15 16:23:01 +0000</creation_ts>
          <short_desc>DEPENDS not honored when rebuilding from sstate with SSTATEPOSTINSTFUNCS</short_desc>
          <delta_ts>2011-07-25 08:11:45 +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>1.0</version>
          <rep_platform>x86</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>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.1 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Scott Garman">scott.a.garman</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>14748</commentid>
    <comment_count>0</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2011-07-15 16:23:01 +0000</bug_when>
    <thetext>The following scenario was identified on the autobuilder during this build:

http://autobuilder.pokylinux.org:8010/builders/crownbay/builds/25/steps/shell_17/logs/stdio

At line 1711, docbook-sgml-dtd-3.1-native.bb failed because install-catalog did not exist. install-catalog is provided by sgml-common-native in the native sysroot, and the docbook-sgml-dtd-native.inc recipe has a DEPENDS = &quot;sgml-common-native&quot; in it.

However, if you look at that log, you&apos;ll find that sgml-common-native&apos;s do_populate_sysroot is not run until line 1755.

This seems to indicate that the DEPENDS is not being properly honored.

Of note is that this build is being done from an empty TMPDIR but a fully populated sstate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14754</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-07-16 17:35:33 +0000</bug_when>
    <thetext>I was able to reproduce this even after adding a direct depends on populate_sysroot

do_unpack[depends] += &quot;sgml-common-native:do_populate_sysroot&quot;

Was added to openjade, docbook-sgml-dtd, and docbook-dsssl-sytlesheets.

I then did a cleansstate on the following recipes:

bitbake openjade-native sgml-common-native docbook-dsssl-stylesheets-native docbook-sgml-dtd-4.5-native docbook-utils-native -c cleanstate

Followed by a bitbake of docbook-utils-native (has dependencies on the other docbook items).

Then I did a bitbake -c clean of the above list and tried to build docbook-utils-native again, and I could reproduce the failure right away.


 bitbake docbook-utils-native
Loading cache: 100% |####################################################################################################| ETA:  00:00:00
Loaded 1028 entries from dependency cache.

OE Build Configuration:
BB_VERSION        = &quot;1.13.2&quot;
TARGET_ARCH       = &quot;x86_64&quot;
TARGET_OS         = &quot;linux&quot;
MACHINE           = &quot;sugarbay&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.0+snapshot-20110717&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        = &quot;rc3:aca9d745202ebdc6d3638a62c22af7ab8fb9b1a1&quot;
meta-sugarbay     = &quot;master:92fc07a5f1b98779806cdcc2341487ff5ea5a238&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Running setscene task 14 of 19 (/intel/poky/distro/meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb:do_populate_sysroot_setscene)
NOTE: Running setscene task 15 of 19 (/intel/poky/distro/meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb:do_populate_lic_setscene)
NOTE: Running setscene task 16 of 19 (/intel/poky/distro/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb:do_populate_sysroot_setscene)
NOTE: Running setscene task 17 of 19 (/intel/poky/distro/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb:do_populate_sysroot_setscene)
NOTE: package openjade-native-1.3.2-r3: task do_populate_sysroot_setscene: Started
NOTE: package docbook-dsssl-stylesheets-native-1.79-r3: task do_populate_sysroot_setscene: Started
NOTE: package docbook-utils-native-0.6.14-r1: task do_populate_sysroot_setscene: Started
NOTE: package docbook-utils-native-0.6.14-r1: task do_populate_lic_setscene: Started
NOTE: package docbook-utils-native-0.6.14-r1: task do_populate_sysroot_setscene: Succeeded
NOTE: package docbook-utils-native-0.6.14-r1: task do_populate_lic_setscene: Succeeded
ERROR: Task 65 (/intel/poky/distro/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb, do_populate_sysroot_setscene) failed with exit code &apos;1&apos;
ERROR: Task 51 (/intel/poky/distro/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb, do_populate_sysroot_setscene) failed with exit code &apos;1&apos;
NOTE: Running setscene task 19 of 19 (/intel/poky/distro/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb:do_populate_sysroot_setscene)
NOTE: package sgml-common-native-0.6.3-r0: task do_populate_sysroot_setscene: Started
NOTE: package sgml-common-native-0.6.3-r0: task do_populate_sysroot_setscene: Succeeded
NOTE: Executing RunQueue Tasks
NOTE: Running noexec task 110 of 111 (ID: 8, /intel/poky/distro/meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb, do_package_write)
NOTE: Running noexec task 111 of 111 (ID: 5, /intel/poky/distro/meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb, do_build)
NOTE: Tasks Summary: Attempted 111 tasks of which 109 didn&apos;t need to be rerun and 0 failed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14758</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-07-18 06:15:58 +0000</bug_when>
    <thetext>By definition providing a sstate package means you that DEPENDS need not be honored. This isn&apos;t therefore a bug in the dependency handling but in the way sstate is being used :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14759</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-07-18 06:26:35 +0000</bug_when>
    <thetext>Another worrying factor is that even if the sstate package fails, it should just get rebuilt and things should continue so this error should not be fatal...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14760</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-07-18 07:00:44 +0000</bug_when>
    <thetext>Ok, I propose that we:

a) Have any of the recipes with these postinstalls take a copy of install-catalog out of the sysroot and place it into recipe&apos;s sysroot contents with a suitable suffix, something like:

SYSROOT_PREPROCESS_FUNCS += &quot;xxx_sysroot_preprocess&quot;

xxx_sysroot_preprocess () {
	install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
	install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-xxx
}

which will always ensure this is present when the sstate package is processed.

This could perhaps now best be done as a bbclass.

b) We need to figure out why when the sstate package failed to install the system didn&apos;t recover as it should have done...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14761</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-07-18 08:02:31 +0000</bug_when>
    <thetext>On the failed sstate package handling issue, there is a fundamental problem with some of the assumptions sstate operates under.

For target packages we&apos;d never run them so its safe to assume that any (build) DEPENDS are now unneeded and also runtime RDEPENDS and so forth are not required. Its these cases the design of sstate is catering well for.

The problem comes with native/cross sstate packages where build time dependencies shouldn&apos;t be required but runtime dependencies can be. Worse still, looking at RDEPENDS isn&apos;t enough since we autodetect shared library dependencies so the RDEPENDS information in the metadata isn&apos;t complete.

The easiest solution is likely to make sstate start looking at DEPENDS+RDEPENDS in the native/cross case.

Its worth nothing that the checksum code gives a significant amount of protection assuming sstate data is mirrored completely as only in the case of a failed package installation would an issue arise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14971</commentid>
    <comment_count>6</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-07-25 08:11:45 +0000</bug_when>
    <thetext>I implemented Richards suggestions from above in the following commits:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=afa695fd317f5de6cee803091b3c8fb25948237e

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e9e77799a1b9dd84c1d83cbc1efcf5bdb604f7a7

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f9fe0ae3c88ab4be954890df0053fc9c11cfc8a5</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>