FS#66717 - Disable cyclic dependency warnings per default
Attached to Project:
Pacman
Opened by Richard Neumann (rne) - Wednesday, 20 May 2020, 08:33 GMT
Last edited by Andrew Gregory (andrewgregory) - Wednesday, 20 May 2020, 17:45 GMT
Opened by Richard Neumann (rne) - Wednesday, 20 May 2020, 08:33 GMT
Last edited by Andrew Gregory (andrewgregory) - Wednesday, 20 May 2020, 17:45 GMT
|
Details
Summary and Info:
In the official support forums, there are numerous topics on newbies being confused with pacman's warning on cyclic dependencies on sync operations. To name just the latest example: https://bbs.archlinux.org/viewtopic.php?id=255888 The general advice is to ignore that warning and confirm the transaction. I wonder as to why pacman is displaying this warning at all if it can generally be ignored. Imho this should be a debug-level message, only displayed when --debug has been enabled. This would confuse less users and make pacman less noisy. Steps to Reproduce: N/A |
This task depends upon
Closed by Andrew Gregory (andrewgregory)
Wednesday, 20 May 2020, 17:45 GMT
Reason for closing: Won't implement
Wednesday, 20 May 2020, 17:45 GMT
Reason for closing: Won't implement
$ LANG=C sudo pacman -Rncs pacman
checking dependencies...
:: python-jinja optionally requires python-babel: for i18n support
:: qt5-tools optionally requires clang: for qdoc
warning: pacman is designated as a HoldPkg.
:: HoldPkg was found in target list. Do you want to continue? [y/N]
Either all transactions that may cause errors should default to [y/N] or it's up to the user to choose wisely.
Why the discrepancy?
The user (or distro) has used HoldPkg to set a list of packages you specifically do not want to remove as it will break your system. When you ask to remove then, pacman makes sure you know that is against what is configured and defaults not to continue.
Dependency loops can have no consequence or be bad. Pacman is unable to determine that, so informs the user and continues. As the most common dependency loops are in a minor handful of distro packages, the operation having "no consequences" is given higher weight and pacman continues by default (but the user is given an option to stop).
The whole point of HoldPKg is to hold it, which means to ignore you when you try to remove it, so obviously we cannot possibly allow --noconfirm to remove it anyway, and this is on top of the fact that when pacman is told on the one hand to remove it and on the other hand to not remove it, it needs to ask a special question *before* the general question about the transaction as a whole.
The whole point of a cyclic dependency warning is that there's nothing you can do about it except try to fix the cyclic dependency, though you could try to work around it by installing it twice to ensure install scripts are correctly executed, should issues pop up. Since there's nothing you can do about it, you're not given the option to confirm or deny it, any more than you get an option to confirm or deny an IgnorePkg during a pacman -Syu, which also logs a warning. You do, however, get a general question about the transaction as a whole.
On a separate, completely unrelated note, which has absolutely nothing to do with prompts of any sort, you seem to object to cyclic dependencies being logged at loglevel "warning", because you believe they should be logged at loglevel "debug" in order to not bother the user.
This is wrong, and one example of why it is wrong is
FS#66276. Users should be bothered about this, because it is a bothersome issue. Sometimes.To wrap it up: Cyclic dependencies are (in doubt) actually harmful. Thusly the warning should be kept as-is.
Consequently, one should ask on the forums if one is not absolutely certain that they are not, before confirming such a transaction.