Am 13.12.18 um 20:21 schrieb Andrew Gregory:
On 12/13/18 at 11:44am, Michael Straube wrote:
sync: As pointed out by Andrew Gregory there could be an error when adding duplicates if they are two separate packages with the same name. Add a check in alpm_add_pkg() to test whether the duplicate is actually the same package, and if so, log a debug message and return success to skip the package. If the duplicate is a different package return ALPM_ERR_TRANS_DUP_TARGET and treat that error just like any other error in pacman.
remove: Change alpm_remove_pkg() to just log a debug message and return success to skip duplicates. Remove the handling of ALPM_ERR_TRANS_DUP_TARGET in pacman.
Also fixes FS#49377.
Suggested-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Michael Straube <michael.straube@posteo.de> --- lib/libalpm/add.c | 9 ++++++++- lib/libalpm/remove.c | 3 ++- src/pacman/remove.c | 10 ++-------- src/pacman/sync.c | 11 ++--------- 4 files changed, 14 insertions(+), 19 deletions(-)
Looks good, just a couple minor notes.
I will send a v2 tomorrow, thanks. Michael