Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
libpkg: attempt config file merge for force install
Isaac Freund committed 1 month ago
commit 9169aa51c4ed23e6f2c746b295e2672d169de868
parent 2ec66d7
1 file changed +6 -0
modified libpkg/pkg_jobs.c
@@ -1974,6 +1974,12 @@ pkg_jobs_handle_install(struct pkg_solved *ps, struct pkg_jobs *j)
	    ps->type == PKG_SOLVED_INSTALL))
		flags |= PKG_ADD_AUTOMATIC;

+
	// Treat installs where there is already a local package (e.g. a forced install)
+
	// like an upgrade to handle config merging properly.
+
	if (old == NULL) {
+
		old = pkg_jobs_universe_get_local(j->universe, new->uid, 0);
+
	}
+

	if (new->type == PKG_GROUP_REMOTE)
		retcode = pkg_add_group(new);
	else if (old != NULL)