<?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>9863</bug_id>
          
          <creation_ts>2016-07-01 09:16:59 +0000</creation_ts>
          <short_desc>Changing files in packages-split with populate_packages_prepend does not impact rpm packages, while it does for deb and ipk</short_desc>
          <delta_ts>2017-12-06 16:56:37 +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>Scripts and Tools</component>
          <version>unspecified</version>
          <rep_platform>All</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.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego">diego.ml</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</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>63567</commentid>
    <comment_count>0</comment_count>
    <who name="Diego">diego.ml</who>
    <bug_when>2016-07-01 09:16:59 +0000</bug_when>
    <thetext>The reference thread is:
https://lists.yoctoproject.org/pipermail/yocto/2016-May/030351.html

How to trigger the issue is detailed here:
https://lists.yoctoproject.org/pipermail/yocto/2016-June/030375.html
and the problem is discussed here:
https://lists.yoctoproject.org/pipermail/yocto/2016-June/030395.html
https://lists.yoctoproject.org/pipermail/yocto/2016-June/030400.html

With my tests I confirm that the rpm package is unchanged, not respecting what is under packages-split, while both deb and ipk packages are correct.

To have an example that reproduces this problem create a base-files_%.bbappend with the following contents:
FILESEXTRAPATHS_append := &quot;${THISDIR}/${PN}&quot;

SRC_URI += &quot;file://fstab-flash \
        file://fstab-regular \
        &quot;

PACKAGES += &quot; ${PN}-flash ${PN}-regular&quot;
CONFFILES_${PN}-flash = &quot;${CONFFILES_${PN}}&quot;
CONFFILES_${PN}-regular = &quot;${CONFFILES_${PN}}&quot;

pkg_preinst_${PN}-flash = &quot;${pkg_preinst_${PN}}&quot;
pkg_preinst_${PN}-regular = &quot;${pkg_preinst_${PN}}&quot;

RREPLACES_${PN}-flash = &quot;${PN}&quot;
RPROVIDES_${PN}-flash = &quot;${PN}&quot;
RCONFLICTS_${PN}-flash = &quot;${PN}&quot;

RREPLACES_${PN}-regular = &quot;${PN}&quot;
RPROVIDES_${PN}-regular = &quot;${PN}&quot;
RCONFLICTS_${PN}-regular = &quot;${PN}&quot;

python populate_packages_prepend() {
    import shutil

    packages = (&quot;${PN}-flash&quot;, &quot;${PN}-regular&quot;)
    for package in packages:
        # copy ${PN} content to packages
        shutil.copytree(&quot;${PKGD}&quot;, &quot;${PKGDEST}/%s&quot; % package, symlinks=True)
        # replace fstab
        if package == &quot;${PN}-flash&quot;:
            shutil.copy(&quot;${WORKDIR}/fstab-flash&quot;,
&quot;${PKGDEST}/${PN}-flash/etc/fstab&quot;)
        else:
            shutil.copy(&quot;${WORKDIR}/fstab-regular&quot;,
&quot;${PKGDEST}/${PN}-regular/etc/fstab&quot;)
}

and provide 2 different &quot;fstab-regular&quot; and &quot;fstab-flash&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64576</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-07-28 12:46:21 +0000</bug_when>
    <thetext>I know Ed has looked into this. The issue is that deb/ipk use the packages-split directories in a particular way whilst rpm uses the packages-split directory to indicate how to split the packages but pulls the files from packages/, due to the way rpmbuild works.

The trouble is your code is breaking some of the assumptions that the packaging code makes.

The system doesn&apos;t support a few things:

a) You can&apos;t put the same file into multiple packages. If two packages need it, they should have some kind of dependency relationship on a separate package which contains that file or files.
b) You shouldn&apos;t bypass PACKAGES and FILES_&lt;pkg&gt;, these are used to build the different packages and used for a variety of checks. Effectively by copying files in populate_packages you&apos;re bypassing this. This isn&apos;t supported.
c) One recipe can&apos;t install different files into the same location. You need to use separate recipes for that.

So you really need to use a different approach to achieve this, sorry.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>