Bug 8912 - [internalsolv] opkg remove --autoremove' does not fully uninstall product.
Summary: [internalsolv] opkg remove --autoremove' does not fully uninstall product.
Status: ACCEPTED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.0
Hardware: x86 x86_64
: Undecided minor
Target Milestone: ---
Assignee: Alex Stewart
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-01-12 21:49 UTC by Max McCord
Modified: 2021-07-08 15:10 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max McCord 2016-01-12 21:49:39 UTC
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.
Comment 1 Alejandro del Castillo 2016-01-12 23:14:00 UTC
Bug only reproduces with the internal solver, libsolv backend is fine.
Comment 2 Alejandro del Castillo 2018-12-20 23:35:33 UTC
De-prioritzing internalsolv bugs