When checking package dependency calculation through hob, I've noticed the following inconsistent behavior, I've been using core-image-minimal: 1. If I deselect acl, the package list will change from origin 48 packages to 43 packages. attr brought in by will be changed from acl to task-core-boot. Seems since acl is brought in by udev, udev together with pciutils, udev-extraconf, linux-libc-headers which it brought in will be removed. But I've noticed usbutils will be left behind with brought in by changed from udev to task-core-boot 2. restart hob, if I select remove package attr, which based on the info, no other packages are depended on it and it's brought in be acl. I'd expect based on the acl exercise to see 42 packages left, but ended up with only 30 packages, which I couldn't see any dependency on attr, the removed packages includes: acl, attr, bash, bison, coreutils, cracklib, curl, flex, gmp, gnutls, libcap, libpam, ...etc
Synced with Josh regarding the algorithm and it should be if package is removed all its dependents (Brought in by) will be removed. All the dependents packages removal will trigger all the packages that they're depends on be removed as well. For example, for core-image-minimal, udev depends on acl. So remove acl will trigger udev be removed as well. Removing udev will trigger removing glib-2.0, linux-libc-headers, pciutils, usbutils, udev-extraconf which it depends on as well. And removing glib-2.0 will trigger further removing dbus which it depends on, and so forth... Based on this algorithm, and Josh WIP progress patch, I can see all the packages' removing chain reaction is working correctly for the core-image-minimal acl case, origin image contains 48 packages, after removing acl 30 packages left. Except for package attr, which acl depends on. With acl being removed, attr should also be removed since no other package depends on it. The other issue observed is if I select removing attr, I'd expect 29 packages left since from the information provided by hob, I can only see single relationship between acl and attr. But the reality is if I select remove attr, I'll be left with 12 packages. Seems there're some hidden dependencies for attr that is not show in hob but is taking effect once we select to remove attr. I'd expect those hidden dependencies to be shown in hob otherwise user will be confused and surprised.
Jessica and I agree that this issue is resolved based on recent changes including the fix for bug 1365.
verified against latest master