<?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>11692</bug_id>
          
          <creation_ts>2017-06-20 18:10:55 +0000</creation_ts>
          <short_desc>Recipe sub-pkg RDEPENDS being installed in image even with sub-pkg is not</short_desc>
          <delta_ts>2017-06-28 02:20:27 +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>RESOLVED</bug_status>
          <resolution>NOTABUG</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</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark">mark.asselstine</reporter>
          <assigned_to name="Mark">mark.asselstine</assigned_to>
          <cc>jku</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</cc>
          
          
          <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>74392</commentid>
    <comment_count>0</comment_count>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-20 18:10:55 +0000</bug_when>
    <thetext>If I create a recipe which has additional PACKAGES added and distinct RDEPENDS are added to this &apos;sub&apos; package. Then install only the main pkg (not the sub-pkg) the RDEPENDS will be included in the image despite no actual dependencies.

So for example I can create a simple recipe such as

---meta/recipes-extended/sample/sample_1.0.bb---

LICENSE = &quot;CLOSED&quot;
LIC_FILES_CHKSUM = &quot;&quot;

PACKAGES += &quot;${PN}-extra&quot;

S = &quot;${WORKDIR}&quot;

RDEPENDS_${PN}-extra += &quot;findutils&quot;

# No information for SRC_URI yet (only an external source tree was specified)
SRC_URI = &quot;file://sample.txt&quot;

# NOTE: no Makefile found, unable to determine what needs to be done

do_configure () {
        # Specify any needed configure commands here
        :
}

do_compile () {
        # Specify compilation commands here
        :
}

do_install () {
        install -d ${D}/${datadir}/${BPN}
        install ${S}/sample.txt ${D}/${datadir}/${BPN}/.
}
---
[create the needed sample.txt file]

Then setup a bog standard yocto build by sourcing &apos;oe-init-build-env&apos;. Edit the local.conf to include [CORE_IMAGE_EXTRA_INSTALL += &quot;sample&quot;].

Build and run. You will discover that findutils is installed and available in the rootfs image, since the -extra sub-pkg is not being requested to be included in the image, this is unexpected.

NOTE: this is using dnf, as per the default build setup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74393</commentid>
    <comment_count>1</comment_count>
      <attachid>3834</attachid>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-20 18:13:40 +0000</bug_when>
    <thetext>Created attachment 3834
Sample recipe</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74470</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-06-22 14:47:39 +0000</bug_when>
    <thetext>Do you have dev-pkgs or dbg-pkgs enabled in the image?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74471</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-06-22 14:54:04 +0000</bug_when>
    <thetext>With the sample recipe, PN-extras isn&apos;t generated so anything there is a red herring.

My hunch is that you&apos;ve dev-pkgs IMAGE_FEATURE enabled which means that sample-dev is installed.  As dev packages depend on the -dev form of all build dependencies this means that sample-dev RDEPENDS on findutils-dev, which depends on findutils.

Marking as NEEDINFO, Mark can you verify that this hypothesis is correct or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74553</commentid>
    <comment_count>4</comment_count>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-26 18:53:55 +0000</bug_when>
    <thetext>Ross,

&apos;bitbake core-image-minimal -e&apos; where I have CORE_IMAGE_EXTRA_INSTALL += &quot;sample&quot;, I see:

IMAGE_FEATURES=&quot;debug-tweaks ptest-pkgs&quot;

My sample may not be complete enough but if you do add to it the outcome remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs to be installed in the image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74577</commentid>
    <comment_count>5</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-06-27 16:13:39 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; My sample may not be complete enough but if you do add to it the outcome
&gt; remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs
&gt; to be installed in the image.

There&apos;s probably something else still at play here -- adding &quot;sample&quot; to an image just doesn&apos;t bring findutils with it here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74579</commentid>
    <comment_count>6</comment_count>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-27 20:18:58 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; My sample may not be complete enough but if you do add to it the outcome
&gt; &gt; remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs
&gt; &gt; to be installed in the image.
&gt; 
&gt; There&apos;s probably something else still at play here -- adding &quot;sample&quot; to an
&gt; image just doesn&apos;t bring findutils with it here.

I am checking the &apos;sample&apos; recipe again. I might have to abandon it in favour of the real recipe I am seeing this with (openvswitch in meta-virt). Will let you know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74580</commentid>
    <comment_count>7</comment_count>
      <attachid>3846</attachid>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-27 20:36:33 +0000</bug_when>
    <thetext>Created attachment 3846
updated sample .bb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74581</commentid>
    <comment_count>8</comment_count>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-27 20:41:01 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; My sample may not be complete enough but if you do add to it the outcome
&gt; &gt; &gt; remains the same. The presence of the sub-pkg RDEPENDS will cause these pkgs
&gt; &gt; &gt; to be installed in the image.
&gt; &gt; 
&gt; &gt; There&apos;s probably something else still at play here -- adding &quot;sample&quot; to an
&gt; &gt; image just doesn&apos;t bring findutils with it here.
&gt; 
&gt; I am checking the &apos;sample&apos; recipe again. I might have to abandon it in
&gt; favour of the real recipe I am seeing this with (openvswitch in meta-virt).
&gt; Will let you know.

OK, attached is the updated sample .bb which matches more closely the recipe I encountered this issue with. Note that I still only have

  CORE_IMAGE_EXTRA_INSTALL += &quot;sample&quot;

yet you can see that findutils is being installed

  Installing       : findutils-4.6.0-r0.i586                               6/17 

I am investigating ptest.bbclass for clues as it seems to be involved, though I thought I had seen this reproduced without ptest.

Mark</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74582</commentid>
    <comment_count>9</comment_count>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-27 20:57:17 +0000</bug_when>
    <thetext>Still having trouble making the &apos;sample&apos; recipe behave in the way I am seeing with the openvswitch recipe. Rather than waste folks time let me do some more investigation and update the case once I can put together a proper reproducer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74588</commentid>
    <comment_count>10</comment_count>
    <who name="Mark">mark.asselstine</who>
    <bug_when>2017-06-28 02:20:27 +0000</bug_when>
    <thetext>I went back and looked at the dependencies closer after failing to make the sample recipe behave the same as the recipe I was seeing the issue, looking more closely at Ross&apos; comment #2. Turns out findutils was being pulled in via the -dev package.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3834</attachid>
            <date>2017-06-20 18:13:40 +0000</date>
            <delta_ts>2017-06-20 18:13:40 +0000</delta_ts>
            <desc>Sample recipe</desc>
            <filename>11692.tar.bz2</filename>
            <type>application/x-bzip</type>
            <size>947</size>
            <attacher name="Mark">mark.asselstine</attacher>
            
              <data encoding="base64">QlpoOTFBWSZTWXY0zTMAArF/hMmwAEB8b/+SP+/egP/v3+oAAIBIUAO+WTFALYDhKKZNDVPKPI0n
qMQ2oBkAyNNGgYjQAGplMZVPzUp7UQ9QyZAGgAAAAADQ4aaZGIwmmAhgE0wjBMTIaZGhoDhppkYj
CaYCGATTCMExMhpkaGgEpoRNBACMpmlDQDaTGoeo02phpM1Gm1PU/kPh+245DmPCoIyTMwrAzMcO
fm6IAgsdHQ61PL2MgTNtBMzM4YjepfMc73XA4pnlfUc9x2r2/37rl7Uckqo/hJwoD3DjDSpnlnsi
2GGXNTDKGSHDjokomsrAoQFtGWP60M74nCaRIKYQ7qG9SV5hGPIiIwN4uk9DkOI5qrRDRCmUPqQf
RGKaFmWLX7tGs5SYPqo2+r32Ynyvu0SakSQriWBRsUFW19qjhz71OQ3ES8h+4SAToGmmSBWEAldy
XGjRijAmLd2Nuzz36kasaFbmFIUpbIKZF4GdAHm834+ryA1AEyAVDqq/n9AG+QqFxKYOpbgvD9cH
YUlC56hDy1rZyhPW4F19ssICbh75HiXFcICTifka8vSmVPf7esj8G2mXeGGgfKQSZ3nanqKTXEwZ
tBOYKHExChnI2t0Fg5rIlQ+I+1CZaA7sjaWr8dwtpOB3Y5rUvag9OU1VIMaj4G4eY5kag7G5g/i5
dYewhrQe6fkoanfb9AI7UHzEd6uD2SA79/yz1sfuaZsevAtb0obsECaxrL2GlslvE6INm6e6CQTJ
IOAnC/C3ZomSp9DVLiFRkq7Ny+EnLE7FV9C7qFfFUxuvfHlowWVMQXkQ0w9OFsuWAjSKpi3Tdpam
jC7Jw0HiCDJNI+nVpBylq9tSwWst4aka+Athp6q8BOiJcqmq0MwjM3FMT9MQe+Rw/NbTunkByNXO
oYvum4k2PupoitVMgYNd2Vq0NYCEjcosS4tW04tgR69Va2knViPAwC1zjKs3E57jK2pEgINV52jX
A+wLJM0WnfGNaOvq7VAhyIdaC/0XUilEz1ByJVzOOwydpIZBIb9SG86NwXG+85BsAo5v5LLiX0cW
zIniUyKXLFo6RDsQMZtAI0tmNTQQzyoz5jxgtme+CwF14k9+LWWsQTR4tolh0YgLVdiPhEMTjM0Z
woU8MVhBYy04MidBjaAoUYJdpCVhgma1760TkjC9saMGGA+Jp6WyM/Em+56QjiRO3wDdFcy3Qwmh
mxsZn0PmmbpQk3gMcPK3lc3nUPzeNmZv4u5IpwoSDsaZpmA=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3846</attachid>
            <date>2017-06-27 20:36:33 +0000</date>
            <delta_ts>2017-06-27 20:36:33 +0000</delta_ts>
            <desc>updated sample .bb</desc>
            <filename>sample_2.0.bb.bz2</filename>
            <type>application/x-bzip</type>
            <size>757</size>
            <attacher name="Mark">mark.asselstine</attacher>
            
              <data encoding="base64">QlpoOTFBWSZTWY0LfsQAAHpfgAAwfG+AEj/v3oC/79/qQAL9ZgLaurmDVPQET01N6pk0NAaAAABo
AamTJkaSmymjTQaAAAAAA0NVPTKZANAAAAAAABKaQjQKnmk8mpNk0mQ09E02jI0I9IgOR3nyOUuW
OzxXvDOWTbet3v5TzVUNamKzSZBxIc4iJ4MFIkbDUNCaczHk9z3AVEBNXjhZ+jXPU5bmsIOYY8mN
HJ0MNc60FFNBkSMdhwHDvegvQOZL92CYtcoYl9Mz4e92wOIsEninyVrZ2te25lWGkpchGRGl8tXJ
BQV7MKu47GbqG7BDdoQCfFx4A7Vpvt0V9oRgmuPrqqKefBqBjZByWc6iiv9IN+7aHQ2J36SBwJ2D
z31B3N6CLdzdPnwM5rvoLiTG8nGPA0HXzCUj1HwQmWYbjaYE6PUxEYEazjZdOVTSHlkX0ECwoHrM
R4wbOHiHZLw8x22bThH4UBpctrP6IP8I5LzpXLldKZ5GaMzPYU5hDbxAmpIFLBFrFpE6IF/NH4IE
QTJZD1Vz8boxvFQdIUlRBUCVOjBe0RomkFQ8xfSimmghqnGhQHJYALpIJM10vfaPEFQOg1sOBclZ
scgoAQHlAsIOwpqwOygywR3JaAUwPiwEh4OSTSaDMIsbWmI7IQIEnDcrw+JYA5DN0JMETVNChOia
U2zTpQkKvN6CkgSwDAYBEwgUJcqDs0k9OXUtLF6gyiGsyZ7l1jtQxBHPCc5ErYenOZ52RzI3T0iL
JGhYEssgfse4ucqMoYq9GDBEVkeCMgiGNyG70aGKTGo5hqwk5jomtRVJxX2kdQ6cHPWRDnChignw
w3CKiUJUIIaVTSglWjAiEShVd7yDlnBAIpzfFD5pHnaAdpzkElCJNRJQeUfwhEKownWTGFzC1UoC
AEzkqaZQ5SlWx7JBMCEWleTBZY9pf7NaZtZGql5QRqIRyxeVqxgwmgV0lr/R7YxpihIPlgNR1htc
yDwBzpP+LuSKcKEhGhb9iA==
</data>

          </attachment>
      

    </bug>

</bugzilla>