Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Gracefully handle conflicts
Pietro Cerutti committed 8 years ago
commit f00da194451ebcd37c56747b57d7a1fab9dc07f9
parent d1f21f5
2 files changed +5 -1
modified libpkg/pkg_jobs_conflicts.c
@@ -477,7 +477,8 @@ pkg_conflicts_check_chain_conflict(struct pkg_job_universe_item *it,
			it->pkg->uid);

		if (p != NULL) {
-
			pkg_jobs_universe_process_item(j->universe, p, &cun);
+
			if (pkg_jobs_universe_process_item(j->universe, p, &cun))
+
				continue;
			assert(cun != NULL);
			pkg_conflicts_register_chain(j, it, cun, fcur->path);
		}
modified libpkg/pkg_jobs_universe.c
@@ -570,6 +570,9 @@ pkg_jobs_universe_process_item(struct pkg_jobs_universe *universe, struct pkg *p
	 * flag that means that we have already tried to check our universe
	 */
	rc = pkg_jobs_universe_add_pkg(universe, pkg, false, &found);
+
	if (rc == EPKG_CONFLICT)
+
		return (rc);
+

	if (result)
		*result = found;