Created attachment 3482 [details] 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
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->file_hash), which helps detect conflicts, but doesn'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->file_hash. This change is substantial, so I am re-targeting the fix for a later version.
Resolved by Shruthi Ravichandran's patch [1]. [1] https://groups.google.com/g/opkg-devel/c/tUlw8yW9tVU