<?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>8946</bug_id>
          
          <creation_ts>2016-01-19 17:54:17 +0000</creation_ts>
          <short_desc>opkg install does not appear to fail on file overwrite</short_desc>
          <delta_ts>2017-09-16 21:53:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.3.1</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>Undecided</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>0.3.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Tollerton">rich.tollerton</reporter>
          <assigned_to name="Alejandro del Castillo">alejandro.delcastillo</assigned_to>
          <cc>joshua.prewitt</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57961</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Tollerton">rich.tollerton</who>
    <bug_when>2016-01-19 17:54:17 +0000</bug_when>
    <thetext>https://bugzilla.yoctoproject.org/show_bug.cgi?id=8354#c2 implies that `opkg install` is ignoring whether a file already exists on disk.

In general, it probably ought to be failing the install entirely, regardless of whether or not the file is tracked or untracked. (The only reason it ought to not fail is on upgrade.)

I haven&apos;t specifically tested for this myself, although I vaguely recall seeing related behaviors before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76913</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2017-09-16 21:53:10 +0000</bug_when>
    <thetext>Not able to reproduce. I used the testcase:

import os
import opk, cfg, opkgcl

opk.regress_init()


f = open(&quot;test_file&quot;, &quot;w&quot;)
f.write(&quot;Test&quot;)
f.close()

o = opk.OpkGroup()

pkg = opk.Opk(Package=&quot;a&quot;)
pkg.write(data_files=[&quot;test_file&quot;])
o.addOpk(pkg)

pkg2 = opk.Opk(Package=&quot;b&quot;)
pkg2.write(data_files=[&quot;test_file&quot;])
o.addOpk(pkg2)

o.write_list()
opkgcl.update()

then I ran:

adelcast@delcastillo2 ~/git/opkg/tests $ opkg -o /tmp/opkg install a
Installing a (1.0) on root
adelcast@delcastillo2 ~/git/opkg/tests $ opkg -o /tmp/opkg install b
Installing b (1.0) on root
To remove package debris, try `opkg remove b`.
To re-attempt the install, try `opkg install b`.
Collected errors:
 * check_data_file_clashes: Package b wants to install file /tmp/opkg/test_file
	But that file is already provided by package  * a

There might be a case where check_data_file_clashes is failing, but I am going to need more information to go on. Please re-open if you find a failing case.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>