<?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>8912</bug_id>
          
          <creation_ts>2016-01-12 21:49:39 +0000</creation_ts>
          <short_desc>[internalsolv] opkg remove --autoremove&apos; does not fully uninstall product.</short_desc>
          <delta_ts>2021-07-08 15:10:50 +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.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86_64</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Max McCord">max.mccord</reporter>
          <assigned_to name="Alex Stewart">alex.stewart</assigned_to>
          <cc>alejandro.delcastillo</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>57772</commentid>
    <comment_count>0</comment_count>
    <who name="Max McCord">max.mccord</who>
    <bug_when>2016-01-12 21:49:39 +0000</bug_when>
    <thetext>The following issue occurs on a 64-bit Real-Time flavor of Linux.
https://github.com/ni/nilrt/tree/master

The core of the issue is that when we run these commands:

   opkg install my-product
   opkg remove --autoremove my-product

Many packages that were installed are left on the system, even though they are now orphaned (confirmed this using `opkg whatdepends`). In my case, around 40 packages were left on the system incorrectly.

Here is one particular example of a dependency hierarchy that caused an issue:

   Package: my-product
   Dependencies:
      my-product-data
      my-product-libs
      ...

   Package: my-product-libs
      my-product-data
      ...

When I run the command `opkg remove --autoremove my-product`, I would expect that my-product, my-product-libs, and my-product-data are all removed. However, in my case, my-product-data is left behind.

I have examined the output using verbosity=2, and found that the following occurs:

   * my-product is removed.
   * Cannot remove my-product-data, because another product depends on it.
   * my-product-libs removed.
   * ...opkg never checks my-product-data, even though my-product-libs depends on it!

It seems that while recursively removing packages, opkg forgets to re-check certain packages to see if they are now orphaned. This happens for several packages in my dependency hierarchy (but not all, curiously enough! Some now-orphaned packages are actually re-checked and removed).

The packages are left behind in the same way every time - easily reproducible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57776</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2016-01-12 23:14:00 +0000</bug_when>
    <thetext>Bug only reproduces with the internal solver, libsolv backend is fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82562</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2018-12-20 23:35:33 +0000</bug_when>
    <thetext>De-prioritzing internalsolv bugs</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>