<?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>9464</bug_id>
          
          <creation_ts>2016-04-14 07:39:17 +0000</creation_ts>
          <short_desc>opkg: can&apos;t handle conflicted pkgs correctly</short_desc>
          <delta_ts>2016-05-04 10:51:10 +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.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>9477</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>alejandro.delcastillo</cc>
    
    <cc>alexandru.costinx.roman</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          <qa_contact name="Alexandru Roman">alexandru.costinx.roman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</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>61190</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-04-14 07:39:17 +0000</bug_when>
    <thetext>opkg install nativesdk-buildtools-perl-dummy nativesdk-texinfo

The log would say nativesdk-buildtools-perl-dummy conflicts with nativesdk-perl so that nativesdk-texinfo is not installed, but the first one provides nativesdk-perl, so this is incorrect.

Similar issue to reproduce:

PACKAGE_CLASSES = &quot;package_ipk&quot;

bitbake buildtools-tarball, we will say that nativesdk-perl and nativesdk-buildtools-perl-dummy are installed, but it shouldn&apos;t since nativesdk-buildtools-perl-dummy provides nativesdk-perl, and it is required by user to install. (in TOOLCHAIN_HOST_TASK which is translated into command line).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61229</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-14 15:15:54 +0000</bug_when>
    <thetext>To expand the problem: buildtools-tarball built with opkg contains perl when it shouldn&apos;t, when built with rpm it doesn&apos;t contain perl.  The tarball *should not* contain perl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61237</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-14 16:00:49 +0000</bug_when>
    <thetext>Alejandro: do you have any thoughts on this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61239</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-14 16:11:17 +0000</bug_when>
    <thetext>Expansion for Alejandro: the buildtools-tarball essentially depends on nativesdk-buildtools-perl-dummy and nativesdk-texinfo.  -perl-dummy provides/conflicts with nativesdk-perl so with those install requests perl-dummy and texinfo should both be installed.

However, opkg appears to ignore the explicit request and installs the real nativesdk-perl instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61305</commentid>
    <comment_count>4</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2016-04-15 19:39:18 +0000</bug_when>
    <thetext>I can confirm this is bug on opkg (it&apos;s been there for a while, I think). If you have:

Package a, which Depends on x
Package b, which Provides x and Conflicts x
Package x

and you install a, then try to install b, you&apos;ll get an incorrect error:

adelcast@delcastillo2 ~/git/opkg/tests $ opkg -o /tmp/opkg install a
Collected errors:
 * check_conflicts_for: The following packages conflict with x:
 * check_conflicts_for: 	b * 
 * opkg_solver_install: Cannot install package a.

This is only a problem with the internal solver (default), the libsolv backend does let you install a. 

You can assign the bug to me. I am going to be at SaltConf next week, hope that&apos;s ok (don&apos;t know if this is holding the 2.1 release)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61306</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-15 20:27:07 +0000</bug_when>
    <thetext>How well tested is the libsolv backend?  Should we consider switching?

Personally I&apos;m thinking that we should ensure the release notes mention this and ensure that anyone building buildtools is using rpm (we can enforce this at build time), and backport the fix when it&apos;s ready.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61308</commentid>
    <comment_count>6</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2016-04-15 20:55:57 +0000</bug_when>
    <thetext>Unfortunately, the libsolv backend it&apos;s not ready for prime time yet. 

Regarding a fix, I think I can have something fairly quickly once I get back (Monday 25th). Could have something before then if it&apos;s important...(not that familiar with buildtools)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61333</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-18 12:37:54 +0000</bug_when>
    <thetext>Paul has a workaround, when that is merged we&apos;ll close this but I&apos;ll open a bug specifically against opkg.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61346</commentid>
    <comment_count>8</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2016-04-18 15:16:51 +0000</bug_when>
    <thetext>good, to hear....I assume he suggested to add a Replaces too? I think the combination Provides/Conflicts/Replaces is well tested...

thanks for opening a bug report on opkg, I worked a bit on a solution yesterday...should be able to include it as part of the 0.3.2 release (June)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61347</commentid>
    <comment_count>9</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-18 15:26:11 +0000</bug_when>
    <thetext>Yes, the fix was a replaces.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61813</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-28 17:28:41 +0000</bug_when>
    <thetext>The nativesdk-buildtools-perl-dummy case is worked around by oe-core b18134ddaf949b4f001a1613ab876aed6324040a (bug 9469).

The general case is filed against opkg as bug 9477.

*** This bug has been marked as a duplicate of bug 9477 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61923</commentid>
    <comment_count>11</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2016-05-04 10:51:10 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>