<?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>10694</bug_id>
          
          <creation_ts>2016-11-18 14:43:43 +0000</creation_ts>
          <short_desc>rpm does not detect file clashes on do_rootfs</short_desc>
          <delta_ts>2017-08-29 01:19:55 +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>devtools / tool chain</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Markus Lehtonen">markus.lehtonen</reporter>
          <assigned_to name="dengke">dengke.du</assigned_to>
          <cc>mark.hatle</cc>
    
    <cc>markus.lehtonen</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>68440</commentid>
    <comment_count>0</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-11-18 14:43:43 +0000</bug_when>
    <thetext>I accidentally stumbled on this when working on bug 10433.

When using package_rpm I didn&apos;t get any error even if two packages provided the same file on the target. Package that gets installed later seems to happily overwrite the file (after which both packages own it).

With ipk, I get an error as expected:
Collected errors:
 * check_data_file_clashes: Package busybox-syslog wants to install file /home/marquiz/yocto/openembedded-core/build-10433/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs/etc/init.d/syslog
	But that file is already provided by package  * sysklogd
 * opkg_solver_install: Cannot install package packagegroup-core-boot.
/build-10433/tmp-glibc/deploy/ipk/i586/eudev_3.2-r0_i586.ipk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69435</commentid>
    <comment_count>1</comment_count>
    <who name="dengke">dengke.du</who>
    <bug_when>2017-01-03 08:51:38 +0000</bug_when>
    <thetext>Hi Markus

The following is my steps to reproduce the errors.

1. add IMAGE_INSTALL_append = &quot; busybox-syslog sysklogd&quot; to conf/local.conf
2. add PACKAGE_CLASSES ?= &quot;package_ipk&quot;
3. bitbake core-image-minimal

No errors appear, how can I reproduce it? Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69471</commentid>
    <comment_count>2</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-01-04 07:48:27 +0000</bug_when>
    <thetext>Oops, I forgot to share the code to reproduce my problem. Please try out

git://git.openembedded.org/openembedded-core-contrib marquiz/debug-10694

On branch that you should be able to reproduce the problem with the steps you described.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69741</commentid>
    <comment_count>3</comment_count>
    <who name="dengke">dengke.du</who>
    <bug_when>2017-01-12 09:59:12 +0000</bug_when>
    <thetext>Hi Markus

The smart can&apos;t detect the file clashes, this is an old issue, but the opkg and dpkg can. We will drop the smart package manager, and use the dnf package manager in the future.

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69750</commentid>
    <comment_count>4</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-01-12 13:52:53 +0000</bug_when>
    <thetext>But, I think this is a bug in rpm. Rpm should detect that it tries to install a package that would overwrite a file already owned by another package (or tries to simultaneously install two packages providing the same file).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69791</commentid>
    <comment_count>5</comment_count>
    <who name="dengke">dengke.du</who>
    <bug_when>2017-01-13 01:41:27 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; But, I think this is a bug in rpm. Rpm should detect that it tries to
&gt; install a package that would overwrite a file already owned by another
&gt; package (or tries to simultaneously install two packages providing the same
&gt; file).

I think detecting the file&apos;s owner is the business of package manager.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69793</commentid>
    <comment_count>6</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-01-13 08:08:33 +0000</bug_when>
    <thetext>And by package manager you mean RPM?

It is definitely the job of rpm to keep track (in it&apos;s database) about the ownership, checksum etc of files. It is not (only) the responsibility of smartpm, dnf or similar. Packages can be installed with rpm directly, i.e. not using e.g. smartpm, and it needs to detect clashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75634</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2017-08-03 22:20:26 +0000</bug_when>
    <thetext>The RPM rule is:

If both packages provide the -same- file, then it is allowed.  On package removal, only the last removal will erase the file.

This is the RPM mechanism that allows multiple packages to provide common man pages, configuration files and other components.

If you have an example where two packages install -different- contents, and do not error.  Then there is an error in RPM, as this should be detected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75670</commentid>
    <comment_count>8</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-08-06 16:57:16 +0000</bug_when>
    <thetext>Yes, this was about a common file with _different_ content being provided by two packages. But, it was with rpm5 so I think this could be closed now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76221</commentid>
    <comment_count>9</comment_count>
    <who name="dengke">dengke.du</who>
    <bug_when>2017-08-29 01:19:55 +0000</bug_when>
    <thetext>As Markus mentationed, this bug was with rpm5, so we can close it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>