QApt::Backend::installPackages() honors dependencies but QApt::Backend::removePackages() does not. Let there are a package A and a package B which depends on A. If I remove A with QApt::Backend::removePackages() B is not removed. If I use QApt::Package::setRemove and QApt::Backend::commitChanges() B is removed: QApt::Backend *backend = ... QApt::Package *pkg = backend->package("A"); pkg->setRemove(); backend->commitChanges();
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Created attachment 153380 [details] Test program This bug still can be reproduced. Test program libqapt_remove uninstalls zsh-common. With libqapt 3.0.5 on Debian Bullseye: $ sudo LANG=C apt install zsh ............................................ The following additional packages will be installed: zsh-common Suggested packages: zsh-doc The following NEW packages will be installed: zsh zsh-common ............................................ $ ./libqapt_remove started $ dpkg -l | grep zsh ii zsh 5.8-6+deb11u1 amd64 shell with lots of features rc zsh-common 5.8-6+deb11u1 all architecture independent files for Zsh $ sudo LANG=C apt-get check Reading package lists... Done Building dependency tree... Done Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: zsh : Depends: zsh-common (= 5.8-6+deb11u1) but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). libqapt_remove code is attached.