lib/package_conflicts.c: do not add dups unnecessarily.
This commit is contained in:
parent
d4f82b24f9
commit
20e5b07b8b
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2012-2013 Juan Romero Pardines.
|
* Copyright (c) 2012-2014 Juan Romero Pardines.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -95,7 +95,9 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
|
|||||||
repopkgver);
|
repopkgver);
|
||||||
buf = xbps_xasprintf("CONFLICT: %s with "
|
buf = xbps_xasprintf("CONFLICT: %s with "
|
||||||
"installed pkg %s", repopkgver, pkgver);
|
"installed pkg %s", repopkgver, pkgver);
|
||||||
|
if (!xbps_match_string_in_array(trans_cflicts, buf))
|
||||||
xbps_array_add_cstring(trans_cflicts, buf);
|
xbps_array_add_cstring(trans_cflicts, buf);
|
||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -117,7 +119,9 @@ xbps_pkg_find_conflicts(struct xbps_handle *xhp,
|
|||||||
"transaction %s <-> %s\n", pkgver, repopkgver);
|
"transaction %s <-> %s\n", pkgver, repopkgver);
|
||||||
buf = xbps_xasprintf("CONFLICT: %s with "
|
buf = xbps_xasprintf("CONFLICT: %s with "
|
||||||
"%s in transaction", repopkgver, pkgver);
|
"%s in transaction", repopkgver, pkgver);
|
||||||
|
if (!xbps_match_string_in_array(trans_cflicts, buf))
|
||||||
xbps_array_add_cstring(trans_cflicts, buf);
|
xbps_array_add_cstring(trans_cflicts, buf);
|
||||||
|
|
||||||
free(buf);
|
free(buf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user