[pacman-dev] [PATCH] [makepkg] fix -r and --needed conflict

Andrew Gregory andrew.gregory.8 at gmail.com
Sat Feb 9 08:49:32 EST 2013

On Sat,  9 Feb 2013 01:54:42 -0600
William Giokas <1007380 at gmail.com> wrote:

> In makepkg, passing -sr --needed causes there to be a conflict when
> pacman goes to remove the dependencies, as the --needed flag is not an
> option for pacman -R. This patch sanitizes the PACMAN_OPTS in the
> remove_deps() function so that it can still run even with the --needed
> option passed to makepkg. (Useful when doing `makepkg -sir --needed`
> to get rid of unneeded {make,check}depends automatically). At the end
> of the remove_deps() function, PACMAN_OPTS is restored to its original
> value.
> Signed-off-by: William Giokas <1007380 at gmail.com>
> ---

If --needed is only useful for the installation of the built package,
why not treat it like --asdeps and only add it to the pacman opts for
that one step rather than add it globally and remove it later?

More information about the pacman-dev mailing list