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
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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
Comment by Andrew Gregory (andrewgregory) - Wednesday, 20 May 2020, 08:42 GMT
pacman doesn't know if the cycle can be ignored safely.
Comment by Richard Neumann (rne) - Wednesday, 20 May 2020, 08:44 GMT
Why does pacman default to "Yes" then on the user prompt?
Comment by Andrew Gregory (andrewgregory) - Wednesday, 20 May 2020, 08:53 GMT
The default does not change based on whether warnings were issued. It is the user's responsibility to read warnings and decide if they warrant cancelling the operation.
Comment by Richard Neumann (rne) - Wednesday, 20 May 2020, 08:54 GMT
Wrong:

$ 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]
Comment by Andrew Gregory (andrewgregory) - Wednesday, 20 May 2020, 08:58 GMT
That is a separate prompt specifically for the HoldPkg. There is no such prompt for dependency cycles, only the final confirmation before actually beginning the operation, and its default is always yes.
Comment by Richard Neumann (rne) - Wednesday, 20 May 2020, 09:00 GMT
Well, then this seems to be an inconsistency in pacman's UI.
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?
Comment by Allan McRae (Allan) - Wednesday, 20 May 2020, 09:12 GMT
I do not see an inconsistency.

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).
Comment by Eli Schwartz (eschwartz) - Wednesday, 20 May 2020, 12:41 GMT
There's no inconsistency here. Different types of prompts work differently because, well, they are different.

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.
Comment by Richard Neumann (rne) - Wednesday, 20 May 2020, 13:33 GMT
Fair enough.
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.

Loading...