FS#34351 - [pacman] The --print option does not print any line for an ignored package
Attached to Project:
Pacman
Opened by Connor Behan (connorbehan) - Monday, 18 March 2013, 05:38 GMT
Last edited by Allan McRae (Allan) - Thursday, 09 May 2013, 23:35 GMT
Opened by Connor Behan (connorbehan) - Monday, 18 March 2013, 05:38 GMT
Last edited by Allan McRae (Allan) - Thursday, 09 May 2013, 23:35 GMT
|
DetailsSet IgnorePkg=foo and run pacman -Sp foo. Instead of seeing the URL for the package foo as stored on the highest priority mirror, you will see an empty string. This is a bug since documentation says --ignore will only take effect on a sysupgrade operation not a print. Moreover, this behaviour is confusing since it is the opposite of what --noconfirm would do. The options --noconfirm and --print are both supposed to surpress questions. However the question "Foo is in IgnorePkg/IgnoreGrp install anyway?" defaults to "yes" with --noconfirm meaning that pacman will continue the operation and install the package. However, the same question defaults to "no" with --print meaning that pacman stops what it is doing and returns. The reason for this in the code is fairly clear. The question_cb function returns without a value whenever config->print is TRUE, leaving the value at the mercy of libalpm. It should really return predictable default values similar to how config->noconfirm would. |
This task depends upon
Closed by Allan McRae (Allan)
Thursday, 09 May 2013, 23:35 GMT
Reason for closing: Fixed
Additional comments about closing: git commit ee3b70c4
Thursday, 09 May 2013, 23:35 GMT
Reason for closing: Fixed
Additional comments about closing: git commit ee3b70c4
--print _asks_ about ignored packages. (Edit: That would break "pacman -Sup > download.list")
If you wish to automatically print all ignored packages, use --noconfirm _with_ --print.
My reason for this is that you may use "pacman -Sup" to get the links to all packages for _the exact operation_ you want to do, so that you can download them on another system.
What you are asking seems to make that impossible (barring grepping out the ignored packages).
pacman -Su does not ask, it just says "skipping foo."
The patch I'm proposing would only change the API when a question is asked. So the behaviour of -Sp changes but -Sup does not.