<?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>10461</bug_id>
          
          <creation_ts>2016-10-19 19:06:55 +0000</creation_ts>
          <short_desc>Uninstall leaks common directories if packages removed out-of-order</short_desc>
          <delta_ts>2022-09-09 21:12:17 +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.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>next-minor</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gabe Jones">gabe.jones</reporter>
          <assigned_to name="Alex Stewart">alex.stewart</assigned_to>
          <cc>alex.stewart</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>67382</commentid>
    <comment_count>0</comment_count>
      <attachid>3482</attachid>
    <who name="Gabe Jones">gabe.jones</who>
    <bug_when>2016-10-19 19:06:55 +0000</bug_when>
    <thetext>Created attachment 3482
Packages used in the reproducing case

What steps will reproduce the problem?

opkg install test-package-1_1.0_core2-64.ipk
opkg install test-package-2_1.0_core2-64.ipk
opkg remove test-package-1
opkg remove test-package-2
find /tmp/commondir/


What is the expected output? What do you see instead?

Expect /tmp/commondir to be removed.  It remains.

What version of the product are you using?

0.3.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72917</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2017-04-27 20:47:29 +0000</bug_when>
    <thetext>Looking at the .list files (/var/lib/opkg/lists):

test-package-1.list

/
/tmp
/tmp/commondir
/tmp/commondir/package1
/tmp/commondir/package1/dummy

test-package-2.list

/tmp/commondir/package2
/tmp/commondir/package2/dummy

Opkg is only tracking the new files/directories that a package is installing, not the files/directories that the package payload contains. Comparing with dpkg .lists:

test-package-1.list

/.
/tmp
/tmp/commondir
/tmp/commondir/package1
/tmp/commondir/package1/dummy

test-package-2.list

/.
/tmp
/tmp/commondir
/tmp/commondir/package2
/tmp/commondir/package2/dummy

Opkg keeps the files/directories ownership in a hash (opkg_config-&gt;file_hash), which helps detect conflicts, but doesn&apos;t make any distinction between files/directories. Seems like opkg needs to write to the .list file the info from data.tar.gz, not from opkg_config-&gt;file_hash. This change is substantial, so I am re-targeting the fix for a later version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94021</commentid>
    <comment_count>2</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2022-09-09 21:12:17 +0000</bug_when>
    <thetext>Resolved by Shruthi Ravichandran&apos;s patch [1].

[1] https://groups.google.com/g/opkg-devel/c/tUlw8yW9tVU</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3482</attachid>
            <date>2016-10-19 19:06:55 +0000</date>
            <delta_ts>2016-10-19 19:06:55 +0000</delta_ts>
            <desc>Packages used in the reproducing case</desc>
            <filename>packages.zip</filename>
            <type>application/zip</type>
            <size>1814</size>
            <attacher name="Gabe Jones">gabe.jones</attacher>
            
              <data encoding="base64">UEsDBBQAAAAIAMpuU0l8Sb7K2wIAACADAAAfAAAAdGVzdC1wYWNrYWdlLTFfMS4wX2Nvcm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