Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
convert from uthash to pkghash
Baptiste Daroussin committed 4 years ago
commit 7dc30d2662b08d732b226fd1ab2a786029b7fc4c
parent 6f31703
8 files changed +127 -80
modified libpkg/pkg_ports.c
@@ -503,16 +503,17 @@ populate_keywords(struct plist *p)
	for (i = 0; keyacts[i].key != NULL; i++) {
		k = xcalloc(1, sizeof(struct keyword));
		a = xmalloc(sizeof(struct action));
-
		strlcpy(k->keyword, keyacts[i].key, sizeof(k->keyword));
+
		k->keyword = xstrdup(keyacts[i].key);
		a->perform = keyacts[i].action;
		DL_APPEND(k->actions, a);
-
		HASH_ADD_STR(p->keywords, keyword, k);
+
		pkghash_safe_add(p->keywords, k->keyword, k, NULL);
	}
}

static void
keyword_free(struct keyword *k)
{
+
	free(k->keyword);
	DL_FREE(k->actions, free);
	free(k);
}
@@ -884,15 +885,18 @@ static int
parse_keywords(struct plist *plist, char *keyword,
    char *line, struct file_attr *attr)
{
-
	struct keyword *k;
+
	struct keyword *k = NULL;
	struct action *a;
	int ret = EPKG_FATAL;
+
	pkghash_entry *e;

	/* if keyword is empty consider it as a file */
	if (*keyword == '\0')
		return (file(plist, line, attr));

-
	HASH_FIND_STR(plist->keywords, keyword, k);
+
	e = pkghash_get(plist->keywords, keyword);
+
	if (e != NULL)
+
		k = (struct keyword *)e->value;
	if (k != NULL) {
		LL_FOREACH(k->actions, a) {
			ret = a->perform(plist, line, attr);
@@ -1054,7 +1058,11 @@ plist_free(struct plist *p)
	if (p->plistdirfd != -1)
		close(p->plistdirfd);

-
	HASH_FREE(p->keywords, keyword_free);
+
	pkghash_it it = pkghash_iterator(p->keywords);
+
	while (pkghash_next(&it))
+
		keyword_free((struct keyword *)it.value);
+
	pkghash_destroy(p->keywords);
+
	p->keywords = NULL;

	free(p->uname);
	free(p->gname);
modified libpkg/pkg_repo.c
@@ -61,7 +61,6 @@ struct sig_cert {
	char *cert;
	int64_t certlen;
	bool cert_allocated;
-
	UT_hash_handle hh;
	bool trusted;
};

@@ -128,15 +127,15 @@ pkg_repo_file_has_ext(const char *path, const char *ext)
}

static bool
-
pkg_repo_check_fingerprint(struct pkg_repo *repo, struct sig_cert *sc, bool fatal)
+
pkg_repo_check_fingerprint(struct pkg_repo *repo, pkghash *sc, bool fatal)
{
-
	struct fingerprint *f = NULL;
	char *hash;
	int nbgood = 0;
-
	struct sig_cert *s = NULL, *stmp = NULL;
+
	struct sig_cert *s = NULL;
	struct pkg_repo_meta_key *mk = NULL;
+
	pkghash_it it;

-
	if (HASH_COUNT(sc) == 0) {
+
	if (pkghash_count(sc) == 0) {
		if (fatal)
			pkg_emit_error("No signature found");
		return (false);
@@ -148,13 +147,19 @@ pkg_repo_check_fingerprint(struct pkg_repo *repo, struct sig_cert *sc, bool fata
			return (false);
	}

-
	HASH_ITER(hh, sc, s, stmp) {
+
	it = pkghash_iterator(sc);
+
	while (pkghash_next(&it)) {
+
		s = (struct sig_cert *) it.value;
		if (s->sig != NULL && s->cert == NULL) {
			/*
			 * We may want to check meta
			 */
-
			if (repo->meta != NULL && repo->meta->keys != NULL)
-
				HASH_FIND_STR(repo->meta->keys, s->name, mk);
+
			if (repo->meta != NULL && repo->meta->keys != NULL) {
+
				mk = NULL;
+
				pkghash_entry *e = pkghash_get(repo->meta->keys, s->name);
+
				if (e != NULL)
+
					mk = (struct pkg_repo_meta_key *)e->value;
+
			}

			if (mk != NULL && mk->pubkey != NULL) {
				s->cert = mk->pubkey;
@@ -175,8 +180,7 @@ pkg_repo_check_fingerprint(struct pkg_repo *repo, struct sig_cert *sc, bool fata
		s->trusted = false;
		hash = pkg_checksum_data(s->cert, s->certlen,
		    PKG_HASH_TYPE_SHA256_HEX);
-
		HASH_FIND_STR(repo->revoked_fp, hash, f);
-
		if (f != NULL) {
+
		if (pkghash_get(repo->revoked_fp, hash) != NULL) {
			if (fatal)
				pkg_emit_error("At least one of the "
					"certificates has been revoked");
@@ -185,12 +189,11 @@ pkg_repo_check_fingerprint(struct pkg_repo *repo, struct sig_cert *sc, bool fata
			return (false);
		}

-
		HASH_FIND_STR(repo->trusted_fp, hash, f);
-
		free(hash);
-
		if (f != NULL) {
+
		if (pkghash_get(repo->trusted_fp, hash) != NULL) {
			nbgood++;
			s->trusted = true;
		}
+
		free(hash);
	}

	if (nbgood == 0) {
@@ -204,17 +207,22 @@ pkg_repo_check_fingerprint(struct pkg_repo *repo, struct sig_cert *sc, bool fata
}

static void
-
pkg_repo_signatures_free(struct sig_cert *sc)
+
pkg_repo_signatures_free(pkghash *sc)
{
-
	struct sig_cert *s, *stmp;
-

-
	HASH_ITER(hh, sc, s, stmp) {
-
		HASH_DELETE(hh, sc, s);
+
	struct sig_cert *s;
+
	pkghash_it it;
+

+
	if (sc == NULL)
+
		return;
+
	it = pkghash_iterator(sc);
+
	while (pkghash_next(&it)) {
+
		s = (struct sig_cert *)it.value;
		free(s->sig);
		if (s->cert_allocated)
			free(s->cert);
		free(s);
	}
+
	pkghash_destroy(sc);
}


@@ -396,7 +404,7 @@ pkg_repo_meta_extract_signature_fingerprints(int fd, void *ud)
}

static int
-
pkg_repo_parse_sigkeys(const char *in, int inlen, struct sig_cert **sc)
+
pkg_repo_parse_sigkeys(const char *in, int inlen, pkghash **sc)
{
	const char *p = in, *end = in + inlen;
	int rc = EPKG_OK;
@@ -412,6 +420,7 @@ pkg_repo_parse_sigkeys(const char *in, int inlen, struct sig_cert **sc)
	int len = 0, tlen;
	struct sig_cert *s = NULL;
	bool new = false;
+
	pkghash_entry *e;

	while (p < end) {
		switch (state) {
@@ -450,8 +459,10 @@ pkg_repo_parse_sigkeys(const char *in, int inlen, struct sig_cert **sc)
				free(s);
				return (EPKG_FATAL);
			}
-
			HASH_FIND(hh, *sc, p, len, s);
-
			if (s == NULL) {
+
			char *k = xstrndup(p, len);
+
			e = pkghash_get(*sc, k);
+
			free(k);
+
			if ( e == NULL) {
				s = xcalloc(1, sizeof(struct sig_cert));
				tlen = MIN(len, sizeof(s->name) - 1);
				memcpy(s->name, p, tlen);
@@ -459,6 +470,7 @@ pkg_repo_parse_sigkeys(const char *in, int inlen, struct sig_cert **sc)
				new = true;
			}
			else {
+
				s = (struct sig_cert *)e->value;
				new = false;
			}
			state = fp_parse_siglen;
@@ -505,7 +517,7 @@ pkg_repo_parse_sigkeys(const char *in, int inlen, struct sig_cert **sc)
			p += len;

			if (new)
-
				HASH_ADD_STR(*sc, name, s);
+
				pkghash_safe_add(*sc, s->name, s, NULL);

			break;
		}
@@ -517,9 +529,10 @@ pkg_repo_parse_sigkeys(const char *in, int inlen, struct sig_cert **sc)
static int
pkg_repo_archive_extract_archive(int fd, const char *file,
    struct pkg_repo *repo, int dest_fd,
-
    struct sig_cert **signatures)
+
    pkghash **signatures)
{
-
	struct sig_cert *sc = NULL, *s;
+
	struct pkghash *sc = NULL;
+
	struct sig_cert *s;
	struct pkg_extract_cbdata cbdata;

	char *sig = NULL;
@@ -544,7 +557,7 @@ pkg_repo_archive_extract_archive(int fd, const char *file,
			s->sig = sig;
			s->siglen = siglen;
			strlcpy(s->name, "signature", sizeof(s->name));
-
			HASH_ADD_STR(sc, name, s);
+
			pkghash_safe_add(sc, s->name, s, NULL);
		}
	}
	else if (pkg_repo_signature_type(repo) == SIG_FINGERPRINT) {
@@ -596,7 +609,9 @@ static int
pkg_repo_archive_extract_check_archive(int fd, const char *file,
    struct pkg_repo *repo, int dest_fd)
{
-
	struct sig_cert *sc = NULL, *s, *stmp;
+
	pkghash *sc = NULL;
+
	struct sig_cert *s;
+
	pkghash_it it;
	int ret, rc;

	ret = rc = EPKG_OK;
@@ -618,6 +633,9 @@ pkg_repo_archive_extract_check_archive(int fd, const char *file,
			rc = EPKG_FATAL;
			goto out;
		}
+
		it = pkghash_iterator(sc);
+
		pkghash_next(&it); /* check that there is content is already above */
+
		s = (struct sig_cert *)it.value;
		/*
		 * Here are dragons:
		 * 1) rsa_verify is NOT rsa_verify_cert
@@ -626,7 +644,7 @@ pkg_repo_archive_extract_check_archive(int fd, const char *file,
		 *
		 * by @bdrewery
		 */
-
		ret = rsa_verify(pkg_repo_key(repo), sc->sig, sc->siglen - 1,
+
		ret = rsa_verify(pkg_repo_key(repo), s->sig, s->siglen - 1,
		    dest_fd);
		if (ret != EPKG_OK) {
			pkg_emit_error("Invalid signature, "
@@ -636,7 +654,9 @@ pkg_repo_archive_extract_check_archive(int fd, const char *file,
		}
	}
	else if (pkg_repo_signature_type(repo) == SIG_FINGERPRINT) {
-
		HASH_ITER(hh, sc, s, stmp) {
+
		it = pkghash_iterator(sc);
+
		while (pkghash_next(&it)) {
+
			s = (struct sig_cert *)it.value;
			ret = rsa_verify_cert(s->cert, s->certlen, s->sig, s->siglen,
				dest_fd);
			if (ret == EPKG_OK && s->trusted) {
@@ -781,9 +801,11 @@ pkg_repo_fetch_meta(struct pkg_repo *repo, time_t *t)
	unsigned char *map = NULL;
	int fd, dbdirfd, metafd;
	int rc = EPKG_OK, ret;
-
	struct sig_cert *sc = NULL, *s, *stmp;
+
	pkghash *sc = NULL;
+
	struct sig_cert *s;
	struct pkg_repo_check_cbdata cbdata;
	bool newscheme = false;
+
	pkghash_it it;

	dbdirfd = pkg_get_dbdirfd();
	snprintf(filepath, sizeof(filepath), "%s.meta", pkg_repo_name(repo));
@@ -864,7 +886,9 @@ pkg_repo_fetch_meta(struct pkg_repo *repo, time_t *t)
	if (repo->signature_type == SIG_FINGERPRINT) {
		cbdata.len = st.st_size;
		cbdata.map = map;
-
		HASH_ITER(hh, sc, s, stmp) {
+
		it = pkghash_iterator(sc);
+
		while (pkghash_next(&it)) {
+
			s = (struct sig_cert *) it.value;
			if (s->siglen != 0 && s->certlen == 0) {
				/*
				 * We need to load this pubkey from meta
@@ -884,7 +908,9 @@ pkg_repo_fetch_meta(struct pkg_repo *repo, time_t *t)
			goto cleanup;
		}

-
		HASH_ITER(hh, sc, s, stmp) {
+
		it = pkghash_iterator(sc);
+
		while (pkghash_next(&it)) {
+
			s = (struct sig_cert *) it.value;
			ret = rsa_verify_cert(s->cert, s->certlen, s->sig, s->siglen,
				metafd);
			if (ret == EPKG_OK && s->trusted)
@@ -1015,7 +1041,7 @@ pkg_repo_load_fingerprint(const char *dir, const char *filename)
}

static int
-
pkg_repo_load_fingerprints_from_path(const char *path, struct fingerprint **f)
+
pkg_repo_load_fingerprints_from_path(const char *path, pkghash **f)
{
	DIR *d;
	struct dirent *ent;
@@ -1032,7 +1058,7 @@ pkg_repo_load_fingerprints_from_path(const char *path, struct fingerprint **f)
			continue;
		finger = pkg_repo_load_fingerprint(path, ent->d_name);
		if (finger != NULL)
-
			HASH_ADD_STR(*f, hash, finger);
+
			pkghash_safe_add(*f, finger->hash, finger, NULL);
	}

	closedir(d);
@@ -1052,7 +1078,7 @@ pkg_repo_load_fingerprints(struct pkg_repo *repo)
		return (EPKG_FATAL);
	}

-
	if (HASH_COUNT(repo->trusted_fp) == 0) {
+
	if (pkghash_count(repo->trusted_fp) == 0) {
		pkg_emit_error("No trusted certificates");
		return (EPKG_FATAL);
	}
modified libpkg/pkg_repo_create.c
@@ -78,7 +78,6 @@ struct pkg_conflict_bulk {
	struct pkg_conflict *conflicts;
	pkghash *conflictshash;
	char *file;
-
	UT_hash_handle hh;
};

static int
@@ -581,7 +580,8 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
{
	FTS *fts = NULL;
	struct pkg_fts_item *fts_items = NULL, *fts_cur, *fts_start;
-
	struct pkg_conflict_bulk *conflicts = NULL, *curcb, *tmpcb;
+
	pkghash *conflicts = NULL;
+
	struct pkg_conflict_bulk *curcb;
	int num_workers, i, remaining_workers, remain, cur_jobs, remain_jobs, nworker;
	size_t len, tasks_per_worker, ntask;
	struct digest_list_entry *dlist = NULL, *cur_dig, *dtmp;
@@ -591,6 +591,7 @@ pkg_create_repo(char *path, const char *output_dir, bool filelist,
	int retcode = EPKG_FATAL;
	ucl_object_t *meta_dump;
	FILE *mfile;
+
	pkghash_it it;

	char *repopath[2];
	char repodb[MAXPATHLEN];
@@ -828,13 +829,15 @@ cleanup:
		close(mfd);
	if (ffd != -1)
		close(ffd);
-
	HASH_ITER (hh, conflicts, curcb, tmpcb) {
-
		DL_FREE(curcb->conflicts, pkg_conflict_free);
+
	it = pkghash_iterator(conflicts);
+
	while (pkghash_next(&it)) {
+
		curcb = (struct pkg_conflict_bulk *)it.value;
+
		LL_FREE(curcb->conflicts, pkg_conflict_free);
		pkghash_destroy(curcb->conflictshash);
		curcb->conflictshash = NULL;
-
		HASH_DEL(conflicts, curcb);
		free(curcb);
	}
+
	pkghash_destroy(conflicts);

	if (pfd != NULL)
		free(pfd);
modified libpkg/pkg_repo_meta.c
@@ -69,7 +69,8 @@ pkg_repo_meta_set_default(struct pkg_repo_meta *meta)
void
pkg_repo_meta_free(struct pkg_repo_meta *meta)
{
-
	struct pkg_repo_meta_key *k, *ktmp;
+
	struct pkg_repo_meta_key *k;
+
	pkghash_it it;

	/*
	 * It is safe to free NULL pointer by standard
@@ -88,13 +89,15 @@ pkg_repo_meta_free(struct pkg_repo_meta *meta)
		free(meta->maintainer);
		free(meta->source);
		free(meta->source_identifier);
-
		HASH_ITER(hh, meta->keys, k, ktmp) {
-
			HASH_DELETE(hh, meta->keys, k);
+
		it = pkghash_iterator(meta->keys);
+
		while (pkghash_next(&it)) {
+
			k = (struct pkg_repo_meta_key *)it.value;
			free(k->name);
			free(k->pubkey);
			free(k->pubkey_type);
			free(k);
		}
+
		pkghash_destroy(meta->keys);
		free(meta);
	}
}
@@ -290,7 +293,7 @@ pkg_repo_meta_parse(ucl_object_t *top, struct pkg_repo_meta **target, int versio
	while ((cur = ucl_iterate_object(obj, &iter, false)) != NULL) {
		cert = pkg_repo_meta_parse_cert(cur);
		if (cert != NULL)
-
			HASH_ADD_STR(meta->keys, name, cert);
+
			pkghash_safe_add(meta->keys, cert->name, cert, NULL);
	}

	*target = meta;
modified libpkg/pkg_solve.c
@@ -80,7 +80,6 @@ struct pkg_solve_variable {
	const char *digest;
	const char *uid;
	const char *assumed_reponame;
-
	UT_hash_handle hh;
	struct pkg_solve_variable *next, *prev;
};

@@ -100,7 +99,7 @@ struct pkg_solve_rule {
struct pkg_solve_problem {
	struct pkg_jobs *j;
	kvec_t(struct pkg_solve_rule *) rules;
-
	struct pkg_solve_variable *variables_by_uid;
+
	pkghash *variables_by_uid;
	struct pkg_solve_variable *variables;
	PicoSAT *sat;
	size_t nvars;
@@ -172,15 +171,11 @@ pkg_solve_rule_free(struct pkg_solve_rule *rule)
void
pkg_solve_problem_free(struct pkg_solve_problem *problem)
{
-
	struct pkg_solve_variable *v, *vtmp;
-

	while (kv_size(problem->rules)) {
		pkg_solve_rule_free(kv_pop(problem->rules));
	}

-
	HASH_ITER(hh, problem->variables_by_uid, v, vtmp) {
-
		HASH_DELETE(hh, problem->variables_by_uid, v);
-
	}
+
	pkghash_destroy(problem->variables_by_uid);

	picosat_reset(problem->sat);
	free(problem->variables);
@@ -289,6 +284,7 @@ pkg_solve_handle_provide (struct pkg_solve_problem *problem,
	struct pkg_job_universe_item *un;
	struct pkg *pkg;
	bool libfound, providefound;
+
	pkghash_entry *e;

	/* Find the first package in the universe list */
	un = pr->un;
@@ -297,7 +293,11 @@ pkg_solve_handle_provide (struct pkg_solve_problem *problem,
	}

	/* Find the corresponding variables chain */
-
	HASH_FIND_STR(problem->variables_by_uid, un->pkg->uid, var);
+

+
	var = NULL;
+
	e = pkghash_get(problem->variables_by_uid, un->pkg->uid);
+
	if (e != NULL)
+
		var = (struct pkg_solve_variable *)e->value;

	LL_FOREACH(var, curvar) {
		/*
@@ -377,7 +377,10 @@ pkg_solve_add_depend_rule(struct pkg_solve_problem *problem,

	LL_FOREACH2(dep, cur, alt_next) {
		uid = cur->uid;
-
		HASH_FIND_STR(problem->variables_by_uid, uid, depvar);
+
		depvar = NULL;
+
		pkghash_entry *e = pkghash_get(problem->variables_by_uid, uid);
+
		if (e != NULL)
+
			depvar = (struct pkg_solve_variable *)e->value;
		if (depvar == NULL) {
			pkg_debug(2, "cannot find variable dependency %s", uid);
			continue;
@@ -428,7 +431,10 @@ pkg_solve_add_conflict_rule(struct pkg_solve_problem *problem,
	struct pkg *other;

	uid = conflict->uid;
-
	HASH_FIND_STR(problem->variables_by_uid, uid, confvar);
+
	confvar = NULL;
+
	pkghash_entry *e = pkghash_get(problem->variables_by_uid, uid);
+
	if (e != NULL)
+
		confvar = (struct pkg_solve_variable *)e->value;
	if (confvar == NULL) {
		pkg_debug(2, "cannot find conflict %s", uid);
		return (EPKG_END);
@@ -590,7 +596,10 @@ pkg_solve_add_request_rule(struct pkg_solve_problem *problem,
	/*
	 * Get the suggested item
	 */
-
	HASH_FIND_STR(problem->variables_by_uid, req->item->pkg->uid, var);
+
	var = NULL;
+
	pkghash_entry *e = pkghash_get(problem->variables_by_uid, req->item->pkg->uid);
+
	if (e != NULL)
+
		var = (struct pkg_solve_variable *)e->value;
	var = pkg_solve_find_var_in_chain(var, req->item->unit);
	assert(var != NULL);
	/* Assume the most significant variable */
@@ -821,8 +830,7 @@ pkg_solve_add_variable(struct pkg_job_universe_item *un,

		if (tvar == NULL) {
			pkg_debug(4, "solver: add variable from universe with uid %s", var->uid);
-
			HASH_ADD_KEYPTR(hh, problem->variables_by_uid,
-
				var->uid, strlen(var->uid), var);
+
			pkghash_safe_add(problem->variables_by_uid, var->uid, var, NULL);
			tvar = var;
		}
		else {
@@ -868,9 +876,10 @@ pkg_solve_jobs_to_sat(struct pkg_jobs *j)

	/* Add rules for all conflict chains */
	HASH_ITER(hh, j->universe->items, un, utmp) {
-
		struct pkg_solve_variable *var;
-

-
		HASH_FIND_STR(problem->variables_by_uid, un->pkg->uid, var);
+
		struct pkg_solve_variable *var = NULL;
+
		pkghash_entry *e = pkghash_get(problem->variables_by_uid, un->pkg->uid);
+
		if (e != NULL)
+
			var = (struct pkg_solve_variable *)e->value;
		if (var == NULL) {
			pkg_emit_error("internal solver error: variable %s is not found",
			    un->pkg->uid);
@@ -1421,9 +1430,11 @@ pkg_solve_insert_res_job (struct pkg_solve_variable *var,
int
pkg_solve_sat_to_jobs(struct pkg_solve_problem *problem)
{
-
	struct pkg_solve_variable *var, *tvar;
+
	struct pkg_solve_variable *var;
+
	pkghash_it it = pkghash_iterator(problem->variables_by_uid);

-
	HASH_ITER(hh, problem->variables_by_uid, var, tvar) {
+
	while (pkghash_next(&it)) {
+
		var = (struct pkg_solve_variable *)it.value;
		pkg_debug(4, "solver: check variable with uid %s", var->uid);
		pkg_solve_insert_res_job(var, problem);
	}
modified libpkg/private/pkg.h
@@ -413,7 +413,6 @@ struct pkg_repo_meta_key {
	char *pubkey;
	char *pubkey_type; /* TODO: should be enumeration */
	char *name;
-
	UT_hash_handle hh;
};

typedef enum pkg_checksum_type_e {
@@ -451,7 +450,7 @@ struct pkg_repo_meta {
	char *source_identifier;
	int64_t revision;

-
	struct pkg_repo_meta_key *keys;
+
	pkghash *keys;

	time_t eol;

@@ -534,8 +533,8 @@ struct pkg_repo {
	FILE *ssh;
	bool silent;

-
	struct fingerprint *trusted_fp;
-
	struct fingerprint *revoked_fp;
+
	pkghash *trusted_fp;
+
	pkghash *revoked_fp;

	struct {
		int in;
@@ -558,10 +557,8 @@ struct pkg_repo {
};

struct keyword {
-
	/* 64 is more than enough for this */
-
	char keyword[64];
+
	char *keyword;
	struct action *actions;
-
	UT_hash_handle hh;
};

struct plist {
@@ -588,7 +585,7 @@ struct plist {
		size_t len;
		size_t cap;
	} post_patterns;
-
	struct keyword *keywords;
+
	pkghash *keywords;
};

struct file_attr {
@@ -673,7 +670,6 @@ typedef enum {
struct fingerprint {
	hash_t type;
	char hash[BUFSIZ];
-
	UT_hash_handle hh;
};
int pkg_repo_load_fingerprints(struct pkg_repo *repo);

modified tests/frontend/conflicts-multirepo.sh
@@ -159,8 +159,8 @@ Updating database digests format: done
Checking for upgrades (2 candidates):  done
Processing candidates (2 candidates):  done
Checking integrity... done (2 conflicting)
-
  - test-1.1 [local2] conflicts with test2-1 [local1] on ${TMPDIR}/b
  - test-1.1 [local2] conflicts with test2-1 [installed] on ${TMPDIR}/b
+
  - test-1.1 [local2] conflicts with test2-1 [local1] on ${TMPDIR}/b
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):

@@ -171,10 +171,10 @@ Installed packages to be UPGRADED:
Number of packages to be upgraded: 2
${JAILED}[1/2] Deinstalling test2-1...
${JAILED}[1/2] Deleting files for test2-1:  done
-
${JAILED}[1/2] Installing test2-1.1...
-
${JAILED}[1/2] Extracting test2-1.1:  done
${JAILED}[2/2] Upgrading test from 1 to 1.1...
${JAILED}[2/2] Extracting test-1.1:  done
+
${JAILED}[2/2] Installing test2-1.1...
+
${JAILED}[2/2] Extracting test2-1.1:  done
"
	atf_check \
		-o inline:"${OUTPUT}" \
modified tests/frontend/conflicts.sh
@@ -132,8 +132,8 @@ All repositories are up to date.
Checking for upgrades (2 candidates):  done
Processing candidates (2 candidates):  done
Checking integrity... done (2 conflicting)
-
  - bar1-1.1 conflicts with bar-2.0 on ${TMPDIR}/file1
  - bar1-1.1 conflicts with bar-1.0 on ${TMPDIR}/file1
+
  - bar1-1.1 conflicts with bar-2.0 on ${TMPDIR}/file1
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
The following 3 package(s) will be affected (of 0 checked):
@@ -311,8 +311,8 @@ All repositories are up to date.
Checking for upgrades (2 candidates):  done
Processing candidates (2 candidates):  done
Checking integrity... done (2 conflicting)
-
  - bar1-1.1 conflicts with bar-2.0 on ${TMPDIR}/file1
  - bar1-1.1 conflicts with bar-1.0 on ${TMPDIR}/file1
+
  - bar1-1.1 conflicts with bar-2.0 on ${TMPDIR}/file1
Cannot solve problem using SAT solver, trying another plan
Checking integrity... done (0 conflicting)
The following 4 package(s) will be affected (of 0 checked):