buildReplaces: do not add duplicated replacees
authorAlejandro del Castillo <alejandro.delcastillo@ni.com>
Mon, 21 Mar 2016 22:33:59 +0000 (17:33 -0500)
committerJo-Philipp Wich <jo@mein.io>
Wed, 15 Mar 2017 02:16:13 +0000 (03:16 +0100)
commita00a6a9bd4ce2e19b7d5a3f4733f60a5ee32e221
treef5c72f42584e81d480467d4c277395c62210cd77
parent9fbedd85bb595cb4069d3ab5a982f4e9c2b05f40
buildReplaces: do not add duplicated replacees

If package A both replaces and conflicts package B, it is added
unconditionally to the replaced_by vector of package B. Add check to
only add it if it's not there to avoid inaccurate warnings of the type:

Multiple replacers for X, using first one

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
libopkg/pkg_depends.c