<?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>5531</bug_id>
          
          <creation_ts>2013-11-14 08:51:28 +0000</creation_ts>
          <short_desc>QA issue: check whether PACKAGES matches the really generated packages</short_desc>
          <delta_ts>2015-07-03 11:32:41 +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.6</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>6420</dup_id>
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=5529</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>cristina-danielax.agurida</cc>
    
    <cc>hongxu.jia</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Cristina Agurida">cristina-danielax.agurida</qa_contact>
          <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>38762</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-11-14 08:51:28 +0000</bug_when>
    <thetext>Need a QA check on whether the PACKAGES matches the really generated binary pakages, see 5529 for an example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38792</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-11-14 16:13:18 +0000</bug_when>
    <thetext>So not generating empty packages is a deliberate feature of the system and I&apos;m not sure if we need a global check for that.

However, what I think would be useful is a check to ensure that if there is a dependency (RDEPENDS) on a package and that package is empty and not produced, we error out as soon as possible (probably at the end of do_package of the recipe that should have produced the package). This is something I&apos;ve been thinking about for a while and some of the changes that Richard has been working on to make dependency information accessible to the metadata may help with this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38811</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2013-11-15 02:41:19 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; So not generating empty packages is a deliberate feature of the system and
&gt; I&apos;m not sure if we need a global check for that.
&gt; 

Hi Paul,

Yes, not generating empty packages by default is a good feature, but we&apos;d better not leave the nonexistence packages in the PACKAGES, this would cause confusion to the user, such a QA check will help us to cleanup the PACKAGES, and it would be helpful for debug (for example &quot;bitbake -e recipe | grep &apos;^PACKAGES=&apos; &quot; will show the packages that we will really get except the PACKAGES_DYNAMIC), and also helpful when the user add a pkg to PACKAGES, but it isn&apos;t generated.

&gt; However, what I think would be useful is a check to ensure that if there is
&gt; a dependency (RDEPENDS) on a package and that package is empty and not
&gt; produced, we error out as soon as possible (probably at the end of
&gt; do_package of the recipe that should have produced the package). This is
&gt; something I&apos;ve been thinking about for a while and some of the changes that
&gt; Richard has been working on to make dependency information accessible to the
&gt; metadata may help with this.

Sounds greate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43842</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-06-10 16:50:46 +0000</bug_when>
    <thetext>Just so that it&apos;s independent, I&apos;ve now entered bug 6420 to specifically track detecting missing RDEPENDS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47541</commentid>
    <comment_count>4</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-12-12 01:31:21 +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>51413</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>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

...

*** This bug has been marked as a duplicate of bug 6420 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52128</commentid>
    <comment_count>6</comment_count>
    <who name="Cristina Agurida">cristina-danielax.agurida</who>
    <bug_when>2015-07-03 11:32:41 +0000</bug_when>
    <thetext>I&apos;m marking this issue as verified duplicated.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>