<?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>11384</bug_id>
          
          <creation_ts>2017-04-19 10:31:54 +0000</creation_ts>
          <short_desc>image does not contain all RDEPENDS with package_rpm</short_desc>
          <delta_ts>2017-04-20 10:51:38 +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>2.3</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>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kukkonen">jku</reporter>
          <assigned_to name="Jussi Kukkonen">jku</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</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>72648</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-04-19 10:31:54 +0000</bug_when>
    <thetext>intel-corei7-64 core-image-sato built with meta-intel and PACKAGE_CLASSES ?= &quot;package_rpm&quot; fails to include the package libva-intel-driver in the image.

The same build with PACKAGE_CLASSES ?= &quot;package_ipk&quot; does include libva-intel-driver.

I&apos;m filing this in oe-core because the meta-intel stuff seems to work correctly: 
* based on &quot;bitbake -e&quot;, va-intel RDEPENDS on libva-intel-driver (and va-intel does end up on the image)
* MACHINE_FEATURES has &quot;va-impl-intel&quot;, IMAGE_FEATURES has &quot;hwcodecs&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72649</commentid>
    <comment_count>1</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-04-19 10:42:26 +0000</bug_when>
    <thetext>va-intel.spec looks like this:
---
Summary: va-intel version 1.0-r1
Name: va-intel
Version: 1.0
Release: r1
License: MIT
Group: base
Packager: Poky &lt;poky@yoctoproject.org&gt;
BuildRequires: virtual/libc
BuildRequires: virtual/x86_64-poky-linux-compilerlibs
BuildRequires: virtual/x86_64-poky-linux-gcc
Requires: libva
Requires: libva-intel-driver

%description
Video Acceleration Add-ons for Intel BSPs

%files
%defattr(-,-,-,-)
---

yet when I check on the image:
---
# rpm -q --requires va-intel
libva
rpmlib(CompressedFileNames) &lt;= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) &lt;= 4.0-1
---</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72650</commentid>
    <comment_count>2</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-04-19 12:16:17 +0000</bug_when>
    <thetext>The image seemsto pick core2_64 version of the va-intel package even though bitbake built the corei7_64.

Starting from empty TMPDIR:

$ MACHINE=intel-corei7-64 bitbake core-image-sato
$ MACHINE=qemux86-64 bitbake core-image-sato
$ MACHINE=intel-corei7-64 bitbake -ccleansstate core-image-sato
$ MACHINE=intel-corei7-64 bitbake core-image-sato

The first and last images will have completely different manifests: the first one has 0 core2_64 packages, the last one has 583 core2_64 packages.

(the above doesn&apos;t actually show the va-intel problem because va-intel doesn&apos;t get built for qemux86-64 by default, but the reasons are the same)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72651</commentid>
    <comment_count>3</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-04-19 12:21:04 +0000</bug_when>
    <thetext>PACKAGE_ARCHS=&quot;all any noarch x86_64 core2-64 corei7-64 corei7-64-intel-common intel_corei7_64&quot;

So apparently PACKAGE_ARCHS is supposed to be ordered (right-most first), and dnf does not seem to do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72653</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-04-19 12:28:32 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; PACKAGE_ARCHS=&quot;all any noarch x86_64 core2-64 corei7-64
&gt; corei7-64-intel-common intel_corei7_64&quot;
&gt; 
&gt; So apparently PACKAGE_ARCHS is supposed to be ordered (right-most first),
&gt; and dnf does not seem to do that.

The architectures&apos; whitelist is written into rootfs/etc/dnf/vars/arch. What happens if you reverse it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72658</commentid>
    <comment_count>5</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-04-19 14:03:46 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; The architectures&apos; whitelist is written into rootfs/etc/dnf/vars/arch. What
&gt; happens if you reverse it?

This did the trick: correct packages are now getting installed into the rootfs in all my test cases.

I&apos;ve sent a patch so I guess I&apos;ll take the bug for now... Let&apos;s see if I end up regretting this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72711</commentid>
    <comment_count>6</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-04-20 10:51:38 +0000</bug_when>
    <thetext>commit adea8003abe383b9bc532ac5477bc274e270c19a
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Wed Apr 19 16:25:57 2017 +0300

    package_manager.py: Reverse rpm arch order
    
    The architecture list used by dnf/libsolv was in the wrong order.
    As a result, the images were built with wrong and unpredictable
    packages.
    
    $ MACHINE=intel-corei7-64 bitbake core-image-sato
    $ MACHINE=qemux86-64 bitbake core-image-sato
    $ MACHINE=intel-corei7-64 bitbake -ccleansstate core-image-sato
    $ MACHINE=intel-corei7-64 bitbake core-image-sato
    
    The first image had 0 core2_64 packages in it, but the last one had
    583 core2_64 packages (which were built for the qemu image in
    between).
    
    Reverse the arch order in etc/dnf/vars/arch.
    
    Fixes [YOCTO #11384].
    
    (From OE-Core rev: 4a82433de42943f8219beca3286f40b67157172f)
    
    Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
    Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>