[pacman-dev] pacman --print bug

Andrew Gregory andrew.gregory.8 at gmail.com
Tue Aug 13 01:27:46 UTC 2019


On 08/12/19 at 02:15pm, AstroSnail via pacman-dev wrote:
> Hi,
> 
> I think I found a bug in pacman.
> 
> When a package remove operation can't be satisfied, pacman prints an
> error, describes what went wrong, and does nothing:
>     $ sudo pacman -R linux-api-headers
>     checking dependencies...
>     error: failed to prepare transaction (could not satisfy dependencies)
>     :: glibc: removing linux-api-headers breaks dependency 'linux-api-headers>=4.10'
> This is obviously correct.
> 
> When I try to --print a package remove operation that can't be
> satisfied, pacman prints an error, describes it, and does
> nothing, without printing the targets:
>     $ pacman -Rp linux-api-headers
>     error: failed to prepare transaction (could not satisfy dependencies)
>     :: glibc: removing linux-api-headers breaks dependency 'linux-api-headers>=4.10'
> I can understand if this is correct behaviour as well, but at a glance it looks strange.
> 
> When a package remove operation *can* be satisfied, but only with
> user confirmation (e.g. a HoldPkg was found in target list), pacman
> will print warnings and ask for user input before deciding whether
> or not to continue:
>     $ sudo pacman -Rc linux-api-headers
>     checking dependencies...
>     <snip>
>     warning: pacman is designated as a HoldPkg.
>     warning: glibc is designated as a HoldPkg.
>     :: HoldPkg was found in target list. Do you want to continue? [y/N]
> This is obviously correct.
> 
> When I try to --print a package remove operation that *can* be
> satisfied, but only with user input, pacman prints a prompt for
> input but doesn't wait, and exits immediately, without even printing
> the warnings:
>     $ pacman -Rcp linux-api-headers
>     :: HoldPkg was found in target list. Do you want to continue? [y/N]
> This does not sound like correct behaviour to me.

What would you consider correct behavior?


More information about the pacman-dev mailing list