<?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>5204</bug_id>
          
          <creation_ts>2013-09-16 09:54:40 +0000</creation_ts>
          <short_desc>meta/recipes-support/curl/curl_7.29.0.bb install dependency fails</short_desc>
          <delta_ts>2014-01-16 16:32:00 +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.4.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Javi Roman">jroman.espinar</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>Jc</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <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>36742</commentid>
    <comment_count>0</comment_count>
    <who name="Javi Roman">jroman.espinar</who>
    <bug_when>2013-09-16 09:54:40 +0000</bug_when>
    <thetext>Curl bitbake package builds with success:

bitbake -v curl


deploy-rpms/x86_64/curl-7.29.0-r1.x86_64.rpm
deploy-rpms/x86_64/libcurl4-7.29.0-r1.x86_64.rpm
deploy-rpms/x86_64/libcurl-dev-7.29.0-r1.x86_64.rpm
deploy-rpms/x86_64/libcurl-staticdev-7.29.0-r1.x86_64.rpm
deploy-rpms/x86_64/libcurl-doc-7.29.0-r1.x86_64.rpm
deploy-rpms/x86_64/curl-dbg-7.29.0-r1.x86_64.rpm
deploy-rpms/x86_64/curl-dev-7.29.0-r1.x86_64.rpm
deploy-rpms/x86_64/curl-doc-7.29.0-r1.x86_64.rpm

However the installation in the BSP is failing due to a dependency issue:

root@romley:~# smart query *curl*
Loading cache...
Updating cache...                                       ############################################################################# [100%]

curl-7.29.0-r1@x86_64
curl-dbg-7.29.0-r1@x86_64
curl-dev-7.29.0-r1@x86_64
curl-doc-7.29.0-r1@x86_64
libcurl-dev-7.29.0-r1@x86_64
libcurl-doc-7.29.0-r1@x86_64
libcurl-staticdev-7.29.0-r1@x86_64
libcurl4-7.29.0-r1@x86_64


root@romley:~# smart install curl
Loading cache...
Updating cache...                                       ############################################################################# [100%]

Computing transaction...                                                                                                                     error: Can&apos;t install libcurl4-7.29.0-r1@x86_64: no package provides curl-certs

The package curl-certs is not built.

The branch affected is:

		git clone -b dylan git://git.yoctoproject.org/poky.git
		git reset --hard 789b2b7e0cca404ff8ba8ed5ba823d215e6ba5b4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36877</commentid>
    <comment_count>1</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-09-18 14:37:47 +0000</bug_when>
    <thetext>I see two problems here:

- curl-certs is an empty package. there&apos;s nothing out of FILES_${PN}-certs = &quot;${datadir}/curl/curl-*&quot;

- there&apos;s NO dependency between curl and curl-certs. libcurl _recommends_ curl-certs:

RRECOMMENDS_lib${BPN} += &quot;${PN}-certs&quot;

but I can&apos;t find any place where curl is declared to _depend_ on curl-certs.

Are there two different bugs in one here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36936</commentid>
    <comment_count>2</comment_count>
    <who name="Javi Roman">jroman.espinar</who>
    <bug_when>2013-09-19 08:10:11 +0000</bug_when>
    <thetext>It looks like a problem with the &quot;smart&quot; package manager.

If you download curl, and install one using rpm directly, the &quot;Suggest&quot; tag in the SPEC file is working properly.

root@romley:~# smart download curl
Loading cache...
Updating cache...                                       ############################################################################# [100%]

root@romley:~# smart download libcurl4
Loading cache...
Updating cache...                                       ############################################################################# [100%]

root@romley:~# rpm -ih libcurl4-7.29.0-r1.x86_64.rpm 
########################################### [100%]
########################################### [100%]

root@romley:~# rpm -ih curl-7.29.0-r1.x86_64.rpm 
########################################### [100%]
########################################### [100%]

The dependency of curl-certs is avoid in this case, so &quot;smart&quot; the responsible of this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37001</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-09-19 17:24:26 +0000</bug_when>
    <thetext>might be worth trying to reproduce this using either BAD_RECOMMENDATIONS = &quot;curl-certs&quot; or NO_RECOMMENDATIONS = &quot;1&quot;  to see if the issue goes away.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37012</commentid>
    <comment_count>4</comment_count>
    <who name="Javi Roman">jroman.espinar</who>
    <bug_when>2013-09-20 09:35:07 +0000</bug_when>
    <thetext>Those variables didn&apos;t work for me in a curl bbappend recipe.

(In reply to comment #3)
&gt; might be worth trying to reproduce this using either BAD_RECOMMENDATIONS =
&gt; &quot;curl-certs&quot; or NO_RECOMMENDATIONS = &quot;1&quot;  to see if the issue goes away.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37213</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-09-25 16:41:54 +0000</bug_when>
    <thetext>I&apos;ve tried on qemux86 and nuc machines on both dylan and master and have not been able to reproduce this issue - curl installs without error here. I&apos;m not sure what I&apos;m doing differently but clearly I&apos;m not replicating your setup (aside from not being able to test on a romley machine).

Mark, this bug is against dylan so those variables wouldn&apos;t be applicable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37216</commentid>
    <comment_count>6</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-09-25 19:38:12 +0000</bug_when>
    <thetext>Paul which curl version comes when you try to &quot;smart install&quot; it? May be there were an update somewhere in the mean time ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37231</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-09-26 10:08:25 +0000</bug_when>
    <thetext>It&apos;s the same version here. The problem here is definitely to do with smart, rpm, or the data being fed into them, rather than curl.

Can you tell me what output you get with the following commands?

 smart query --show-recommends libcurl4

 smart query --show-requires libcurl4

Actually I suspect I know what might be going on. Did you manually run your host distro&apos;s version of createrepo on the host rpm repositories? I know we advise people to do that but it occurs to me now that that might not be a good idea because it probably won&apos;t index the recommends properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37283</commentid>
    <comment_count>8</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-09-27 07:31:04 +0000</bug_when>
    <thetext>Going to a new build I now have libcurl5 instead of 4? Dunno what I might have done wrong here (I don&apos;t see significant update in meta/recipes-support?). 

Anyway, your intuition is right, I&apos;m running createrepo on the rpm directory. Should this be the problem, what are the alternatives?

Here the requested logs:

# smart query --show-recommends libcurl5

libcurl5-7.29.0-r1@armv5te
  Recommends:
    curl-certs

# smart query --show-requires libcurl5

libcurl5-7.29.0-r1@armv5te
  Requires:
    /bin/sh [pre]
    libc.so.6(GLIBC_2.17)
    libc6 &gt;= 2.17 [pre]
    libc6 &gt;= 2.17
    libcap.so.2 [pre]
    libcap.so.2
    libcap2 &gt;= 2.22 [pre]
    libcap2 &gt;= 2.22
    libgcc1 &gt;= 4.7.2 [pre]
    libgcc1 &gt;= 4.7.2
    libgcc_s.so.1 [pre]
    libgcc_s.so.1
    libgcc_s.so.1(GCC_3.5) [pre]
    libgcc_s.so.1(GCC_3.5)
    libgcrypt.so.11 [pre]
    libgcrypt.so.11
    libgcrypt.so.11(GCRYPT_1.2) [pre]
    libgcrypt.so.11(GCRYPT_1.2)
    libgcrypt11 &gt;= 1.5.0 [pre]
    libgcrypt11 &gt;= 1.5.0
    libgnutls.so.26 [pre]
    libgnutls.so.26
    libgnutls.so.26(GNUTLS_1_4) [pre]
    libgnutls.so.26(GNUTLS_1_4)
    libgnutls26 &gt;= 2.12.23 [pre]
    libgnutls26 &gt;= 2.12.23
    libgpg-error.so.0 [pre]
    libgpg-error.so.0
    libgpg-error0 &gt;= 1.11 [pre]
    libgpg-error0 &gt;= 1.11
    libpthread.so.0 [pre]
    libpthread.so.0
    libpthread.so.0(GLIBC_2.4) [pre]
    libpthread.so.0(GLIBC_2.4)
    libtasn1-3 &gt;= 2.14 [pre]
    libtasn1-3 &gt;= 2.14
    libtasn1.so.3 [pre]
    libtasn1.so.3
    libz.so.1 [pre]
    libz.so.1
    libz1 &gt;= 1.2.7 [pre]
    libz1 &gt;= 1.2.7
    rtld(GNU_HASH) [pre]
    rtld(GNU_HASH)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37286</commentid>
    <comment_count>9</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-09-27 08:47:00 +0000</bug_when>
    <thetext>So the fix really is to use the version of createrepo we build within the build system; this has been patched to support recommends. FYI this is the version we use to create the indexes when an image is built; so if you built an image and then used the feeds from the target immediately afterwards you shouldn&apos;t see the problem (and I&apos;m guessing that&apos;s what you&apos;ve done just now with your most recent build?)

Of course, having to rebuild an image every time to update the indexes would be a pain. The good news is there is &quot;bitbake package-index&quot; which will do this; the bad news is I just found yesterday that it&apos;s broken. However, the fix is now in master, is fairly straightforward and applies cleanly on top of dylan:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2f64fae60b3f61a2c45dc9e5314d2d16b1e64605

Apply that and then you should be able to run &quot;bitbake package-index&quot; to update the indexes instead of running your host&apos;s createrepo. However note that this does mean you need to add channels for each package architecture rather than just one for all, since that&apos;s how we index them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37298</commentid>
    <comment_count>10</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-09-27 14:17:38 +0000</bug_when>
    <thetext>Wow...

- bitbake package-index does not fail at home without your patch :(
- smart cannot find a new package, even after a package-index :( ??

Is there something in the workflow I should have missed ? 

What I&apos;ve done:
- create image
- add repo to image
- smart search cmake (i used cmake as a test as it&apos;s missing from my image)
- from my host, bitbake cmake, bitbake package-index
- smart update
- smart search cmake : still nothing :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37299</commentid>
    <comment_count>11</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-09-27 14:24:43 +0000</bug_when>
    <thetext>It won&apos;t always actually error out without my patch - but it&apos;ll always fail to update the package index properly (it misses out the important package architectures). See bug #5278 for details.

So the steps you performed were with my patch or still without?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37311</commentid>
    <comment_count>12</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-09-27 21:53:28 +0000</bug_when>
    <thetext>Well I did it with your patch but had missed the comment about entering one repo per directory. I added them and now the flow is ok. 

I need to rebuild an image without curl to check if the dependency issue is solved or not...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37446</commentid>
    <comment_count>13</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-10-01 22:40:11 +0000</bug_when>
    <thetext>Things are getting better, but now I face a new issue. In the following install (with the use of bitbake package-index) :
root@qemuarm:~# smart install URI-Escape-XS
Loading cache...
Updating cache...                                        ############################################################################## [100%]

Computing transaction...

Installing packages (9):
  URI-Escape-XS-0.10-r0@armv5te                                         libgcc1-4.7.2-r20@armv5te                                             
  busybox-1.20.2-r11@armv5te                                            libperl5-5.14.3-r1@armv5te                                            
  busybox-syslog-1.20.2-r11@armv5te                                     perl-5.14.3-r1@armv5te                                                
  busybox-udhcpc-1.20.2-r11@armv5te                                     update-alternatives-cworth-1:0.1.8+svnr649-r13.0@armv5te              
  libc6-2.17-r3@armv5te                                                 

358.9kB of package files are needed. 5.0MB will be used.

Confirm changes? (Y/n): Y

Fetching packages...                                                                                                                          
-&gt; http://192.168.7.1:81/rpm/armv5te/busybox-syslog-1.20.2-r11.armv5te.rpm                                                                    
busybox-syslog-1.20.2-r11.armv5te.rpm                    ############################################################################## [ 66%]
-&gt; http://192.168.7.1:81/rpm/armv5te/busybox-udhcpc-1.20.2-r11.armv5te.rpm                                                                    
busybox-udhcpc-1.20.2-r11.armv5te.rpm                    ############################################################################## [ 77%]
-&gt; http://192.168.7.1:81/rpm/armv5te/URI-Escape-XS-0.10-r0.armv5te.rpm                                                                        
URI-Escape-XS-0.10-r0.armv5te.rpm                        ############################################################################## [ 88%]
-&gt; http://192.168.7.1:81/rpm/armv5te/busybox-1.20.2-r11.armv5te.rpm                                                                           
busybox-1.20.2-r11.armv5te.rpm                           ############################################################################## [100%]

                                                                                                                                              
Committing transaction...
error: busybox-syslog-1.20.2-r11 requires /dev/null                                                                                           



Note that if I &quot;smart download&quot; the package and &quot;rpm -i&quot; it, I don&apos;t face the same issue....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37536</commentid>
    <comment_count>14</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-10-03 11:17:36 +0000</bug_when>
    <thetext>This is very strange. What do you get if you do:

smart query --show-all busybox-syslog</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37668</commentid>
    <comment_count>15</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-10-07 09:42:17 +0000</bug_when>
    <thetext>Changing to NEEDINFO as per above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37753</commentid>
    <comment_count>16</comment_count>
    <who name="Jay See">Jc</who>
    <bug_when>2013-10-08 18:51:13 +0000</bug_when>
    <thetext>Hi Paul, 
Sorry for the lag in the reply. Here&apos;s the command result:

busybox-syslog-1.20.2-r11@armv5te {0} [local3] - Tiny versions of many common UNIX utilities in a single small executable.
  Provides:
    busybox-syslog = 1.20.2-r11@armv5te
    busybox-syslog-systemd
  Requires:
    /bin/sh
      Provided By:
        bash-4.2-r6@armv5te (/bin/sh)
        busybox-1.20.2-r11@armv5te (/bin/sh)
    update-alternatives-cworth
        update-alternatives-cworth-1:0.1.8+svnr649-r13.0@armv5te (update-alternatives-cworth = 1:0.1.8+svnr649-r13.0@armv5te)
  Upgrades:
    busybox-syslog &lt; 1.20.2-r11@armv5te
    busybox-syslog-systemd
  Conflicts:
    busybox-syslog-systemd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38036</commentid>
    <comment_count>17</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-10-18 10:54:58 +0000</bug_when>
    <thetext>Hmm, no mention of /dev/null in there.

Right now I&apos;m at a bit of a loss unless I can reproduce this here. Can you provide me with a bit more information as to how you have set up your build so I can try to do the same here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39399</commentid>
    <comment_count>18</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-12-13 17:07:35 +0000</bug_when>
    <thetext>Setting as NEEDINFO again as per above - can you help me to reproduce this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39871</commentid>
    <comment_count>19</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-01-16 16:32:00 +0000</bug_when>
    <thetext>I&apos;m marking this as resolved - I can&apos;t reproduce the problem. If you can still reproduce the issue and you&apos;re able to help me to do so I&apos;m more than happy to investigate it further; in which case please reopen the bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>