On 14/03/13 16:37, Connor Behan wrote:
> Calling pacman -Sp and pacman -Sup are guaranteed not to install a
> package. So the user's IgnorePkg pref is respected regardless of whether
> or not we print the mirror location. Therefore we do so in the case of
> -Sp as this gives the full information requested by the user. We avoid
> doing so in the case of -Sup as this would mislead the user into
> thinking that the upgrade is bigger than it really is. This fixes an
> edge case with devtools.
> 
> Signed-off-by: Connor Behan <[email protected]>
> ---
>  src/pacman/conf.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/pacman/conf.c b/src/pacman/conf.c
> index 3f1b1c3..99e6af1 100644
> --- a/src/pacman/conf.c
> +++ b/src/pacman/conf.c
> @@ -1010,6 +1010,13 @@ int parseconfig(const char *file)
>       if((ret = _parseconfig(file, &section, 1, 0))) {
>               return ret;
>       }
> +     
> +     /* #FS#34066 - Querying URLs for packages specified on the command line 
> (even ignored ones) should succeed */

Fine apart from the comment.  I do not like referring to bug reports.
The comment should stand alone in the code and not require referring
elsewhere.

Also, the comment is not quite right as "pacman -Sup foo" will still
exclude "foo" if that is in IgnorePkg.

How about:

"Print URLs for all given packages on non-upgrade operations"?

If that is OK, I can make the adjustment when I pull it.


> +     if(config->print && !config->op_s_upgrade) {
> +             config->ignorepkg = NULL;
> +             config->ignoregrp = NULL;
> +     }
> +
>       if((ret = setup_libalpm())) {
>               return ret;
>       }
> 


Reply via email to