<?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>11374</bug_id>
          
          <creation_ts>2017-04-18 12:33:30 +0000</creation_ts>
          <short_desc>The &quot;build-deps&quot; QA check mistakenly checks an empty package</short_desc>
          <delta_ts>2017-11-08 05:43:25 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry Rozhkov">dmitry.rojkov</reporter>
          <assigned_to name="Yau Wai Gan">yau.wai.gan</assigned_to>
          <cc>ashwinx.soman</cc>
    
    <cc>ee.peng.yeoh</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Ashwin Soman">ashwinx.soman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Unknown (Hard to categorize)</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>72586</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry Rozhkov">dmitry.rojkov</who>
    <bug_when>2017-04-18 12:33:30 +0000</bug_when>
    <thetext>To reproduce the bug

1. put the line

&gt; PACKAGECONFIG_remove_pn-libxml2 = &quot;python&quot;
&gt; PACKAGECONFIG_remove_pn-libxml2-native = &quot;python&quot;

to a distro config;

2. run `bitbake libxml2`

The result is these errors:

WARNING: libxml2-2.9.4-r0 do_fetch: Failed to fetch URL ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz;name=libtar, attempting MIRRORS if available
ERROR: libxml2-2.9.4-r0 do_package_qa: QA Issue: libxml2-python rdepends on python-core, but it isn&apos;t a build dependency, missing python in DEPENDS or PACKAGECONFIG? [build-deps]
ERROR: libxml2-2.9.4-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: libxml2-2.9.4-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/rojkov/work/refkit/build/tmp-glibc/work/corei7-64-refkit-linux/libxml2/2.9.4-r0/temp/log.do_package_qa.7742
ERROR: Task (/home/rojkov/work/refkit/openembedded-core/meta/recipes-core/libxml/libxml2_2.9.4.bb:do_package_qa) failed with exit code &apos;1&apos;

Whereas the expcted result should be a successful build because libxml2-python is an empty package in this case.

Also this bug is not reproducible if the package is configured with a .bbappend, that is if

&gt; PACKAGECONFIG_remove = &quot;python&quot;

is put in a distro specific libxml2_%.bbappend.

The problem seems to be in a way how variable values are expanded in the DataSmart class.

In the function package_qa_check_rdepends() of insane.bbclass the variable localdata is a local copy of d. Ater calling localdata.setVar(&apos;OVERRIDES&apos;, &apos;libxml2-python&apos;) its method getVar() starts to return a whitespace (&quot; &quot;) for localdata.getVar(&apos;RDEPENDS&apos;) if libxml2-python is made an empty package with PACKAGECONFIG_remove = &quot;python&quot; in a bbappend

But if libxml2-python is made an empty package with PACKAGECONFIG_remove_pn-libxml2 = &quot;python&quot; in a distro config then localdata.getVar(&apos;RDEPENDS&apos;) returns &quot; python-core&quot; and that breaks the &apos;build-deps&apos; QA check because it thinks that libxml2-python actually exists even if it&apos;s empty.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73785</commentid>
    <comment_count>1</comment_count>
    <who name="Yau Wai Gan">yau.wai.gan</who>
    <bug_when>2017-06-07 02:20:05 +0000</bug_when>
    <thetext>Fix implemented and merged.

OE-Core rev:60d28dd72daee235150ab6605cbf953f1ea691df</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77512</commentid>
    <comment_count>2</comment_count>
    <who name="Ashwin Soman">ashwinx.soman</who>
    <bug_when>2017-10-11 08:02:56 +0000</bug_when>
    <thetext>Bug is resolved and tested .
Logs before applying patch:
WARNING: libxml2-2.9.4-r0 do_fetch: Failed to fetch URL ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz;name=libtar, attempting MIRRORS if available
WARNING: libxml2-2.9.4-r0 do_package_qa: QA Issue: libxml2-python rdepends on python3-core, but it isn&apos;t a build dependency? [build-deps]
NOTE: Tasks Summary: Attempted 563 tasks of which 0 didn&apos;t need to be rerun and all succeeded.

Summary: There was 2 WARNING message shown.
pokyuser@7d7eb8a67e63:/workdir/build$


Logs after applying patch:
pokyuser@7d7eb8a67e63:/workdir/build$ bitbake libxml2
WARNING: libxml2-2.9.4-r0 do_fetch: Failed to fetch URL ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz;name=libtar, attempting MIRRORS if available
NOTE: Tasks Summary: Attempted 525 tasks of which 0 didn&apos;t need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.


Note : In current release the error message is replaced by warning for the same .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78050</commentid>
    <comment_count>3</comment_count>
    <who name="Ashwin Soman">ashwinx.soman</who>
    <bug_when>2017-11-08 05:43:25 +0000</bug_when>
    <thetext>Bug have been resolved and verified</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>