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

Allan McRae allan at archlinux.org
Sat Feb 9 10:09:03 EST 2013


On 09/02/13 23:49, Andrew Gregory wrote:
> 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?
> 

Agreed.  Just follow exactly what ASDEP does.

Allan




More information about the pacman-dev mailing list