<?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>6420</bug_id>
          
          <creation_ts>2014-06-10 16:49:34 +0000</creation_ts>
          <short_desc>Detect and error when required packages are not produced</short_desc>
          <delta_ts>2026-03-26 14:27:28 +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>core</component>
          <version>1.8</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>  </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>hongxu.jia</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43841</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-06-10 16:49:34 +0000</bug_when>
    <thetext>During packaging, check if there are any dependencies (RDEPENDS) on packages that have ended up empty and not produced; and if so produce an error as soon as possible, instead of allowing the build to proceed up to do_rootfs and then the package manager reporting the package as missing.

At the moment we probably don&apos;t have access within the metadata to the information that we need for this - we really want to know which recipe BitBake thought was going to satisfy the dependency and report that, since that&apos;s likely where the problem lies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47391</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-12-05 09:31:28 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; During packaging, check if there are any dependencies (RDEPENDS) on packages
&gt; that have ended up empty and not produced; and if so produce an error as
&gt; soon as possible, instead of allowing the build to proceed up to do_rootfs
&gt; and then the package manager reporting the package as missing.
&gt; 
&gt; At the moment we probably don&apos;t have access within the metadata to the
&gt; information that we need for this - we really want to know which recipe
&gt; BitBake thought was going to satisfy the dependency and report that, since
&gt; that&apos;s likely where the problem lies.

Hi Richard,

In order to check the non-existance package was needed
by whom at package producing time, we need to get all
recipes&apos;s RDEPENDS, and calculate dependency chain, but
how to access metadata to get these?

The cachedata have everything what we need, but it is
used for bitbake and not exposed to recipe, do you have
any suggestions to make some API by metadata?

Further more, do we have a mechanism about communication
between recipes by metadata, suce as invoking
d.setVar(&apos;recipe1_info&apos;, **) in recipe1 and invoking
d.getVar(&apos;recipe1_info&apos;) in recipe2.

Thanks,
Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47444</commentid>
    <comment_count>2</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-12-09 03:27:29 +0000</bug_when>
    <thetext>I think we could make use of bb.persist_data.persist to do this:
...
Used to store data in a central location such that other threads/tasks can 
access them at some future date.  Acts as a convenience wrapper around sqlite,
currently, providing a key/value store accessed by &apos;domain&apos;
...

//Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47540</commentid>
    <comment_count>3</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-12-12 01:30:45 +0000</bug_when>
    <thetext>Test Steps:

1. Edit xz and gzip recipe, to simulate a package missing situation (the manually added
rdepends is not real but):
..............
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc
index 671b1eb..7e643e5 100644
--- a/meta/recipes-extended/gzip/gzip.inc
+++ b/meta/recipes-extended/gzip/gzip.inc
@@ -32,3 +32,8 @@ ALTERNATIVE_LINK_NAME[gzip] = &quot;${base_bindir}/gzip&quot;
 ALTERNATIVE_LINK_NAME[zcat] = &quot;${base_bindir}/zcat&quot;
 
 export CONFIG_SHELL=&quot;/bin/sh&quot;
+
+PACKAGES =+ &quot;${PN}-missing1 ${PN}-missing2&quot;
+FILES_${PN}-missing1 = &quot;&quot;
+FILES_${PN}-missing2 = &quot;&quot;
+RPROVIDES_${PN}-missing1 = &quot;${PN}-missing&quot;
diff --git a/meta/recipes-extended/xz/xz_5.1.3alpha.bb b/meta/recipes-extended/xz/xz_5.1.3alpha.bb
index 168e383..c5d8b57 100644
--- a/meta/recipes-extended/xz/xz_5.1.3alpha.bb
+++ b/meta/recipes-extended/xz/xz_5.1.3alpha.bb
@@ -37,6 +37,9 @@ FILES_liblzma-dev = &quot;${includedir}/lzma* ${libdir}/liblzma*${SOLIBSDEV} ${libdir
 FILES_liblzma-staticdev = &quot;${libdir}/liblzma.a&quot;
 FILES_liblzma-dbg = &quot;${libdir}/.debug/liblzma*&quot;
 
+
+RDEPENDS_${PN}_class-target += &quot;gzip-missing gzip-missing2&quot;
+
 BBCLASSEXTEND = &quot;native nativesdk&quot;
 
 export CONFIG_SHELL=&quot;/bin/sh&quot;
..............

2. Vim local.conf
...
IMAGE_INSTALL_append = &quot; xz&quot;
WARN_QA_append = &quot; package-missing&quot;
...

3. bitbake core-image-minimal
..............
|WARNING: QA Issue: package gzip-missing1 not generated, but listed in PACKAGES
|Compute rdepends chains, &apos;--&gt;&apos; means &apos;runtime depends&apos;
|(&quot;gzip-missing1&quot; rprovides &quot;gzip-missing&quot;)
|&quot;xz&quot; -&gt; &quot;gzip-missing&quot;
| [package-missing]
|WARNING: QA Issue: package gzip-missing2 not generated, but listed in PACKAGES
|Compute rdepends chains, &apos;--&gt;&apos; means &apos;runtime depends&apos;
|&quot;xz&quot; -&gt; &quot;gzip-missing2&quot;
| [package-missing]
|ERROR: Unable to install packages. Command &apos;/home/jiahongxu/yocto/build-2014120
2-mips/tmp/sysroots/x86_64-linux/usr/bin/smart --quiet --data-dir=/home/jiahongx
u/yocto/build-20141202-mips/tmp/work/qemumips-poky-linux/core-image-minimal/1.0
-r0/rootfs/var/lib/smart install -y xz@mips32r2 run-postinsts@all packagegroup-
core-boot@qemumips&apos; returned 1:
error: Can&apos;t install xz-5.1.3alpha-r0@mips32r2: no package provides gzip-missing


|ERROR: Function failed: do_rootfs
|ERROR: Logfile of failure stored in: /home/jiahongxu/yocto/build-20141202-mips/
tmp/work/qemumips-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.24338
|ERROR: Task 7 (/home/jiahongxu/yocto/poky/meta/recipes-core/images/core-image-
minimal.bb, do_rootfs) failed with exit code &apos;1&apos;
..............

//Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51412</commentid>
    <comment_count>4</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2015-06-02 02:11:29 +0000</bug_when>
    <thetext>This is rejected by RP:

...
This tells me what the change does. What it doesn&apos;t say is why we need
this?

Its a fairly invasive set of changes but I don&apos;t see the usecase...

Cheers,

Richard

...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51414</commentid>
    <comment_count>5</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2015-06-02 02:11:32 +0000</bug_when>
    <thetext>*** Bug 5531 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51731</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-06-16 10:54:04 +0000</bug_when>
    <thetext>FWIW, Richard wasn&apos;t necessarily rejecting the entire idea of having this check, he was just concerned about how it was described and implemented. I think the heart of the problem is that the solution to this bug has become tied to the the one for bug 5531, however, the issue that 5531 describes is not quite the same - I&apos;m not even sure that 5531 is practical to solve with the current state of our metadata.

I&apos;m reopening this and I&apos;d like us to try implement it such that it will warn 
if a package that is depended upon is not produced at packaging time, assuming that is practical to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56649</commentid>
    <comment_count>7</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2015-11-19 16:03:06 +0000</bug_when>
    <thetext>This was REOPENED</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96834</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:26 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>