[pacman-dev] pacman --print bug

AstroSnail astrosnail at protonmail.com
Mon Aug 12 14:15:04 UTC 2019


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.


More information about the pacman-dev mailing list