Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
When having to return into the solver, replay it entirerly
Baptiste Daroussin committed 9 years ago
commit 51ad2b3aeb48258961df2147bfbbb8b971bccf95
parent e7fcda1
2 files changed +8 -2
modified src/install.c
@@ -208,6 +208,7 @@ exec_install(int argc, char **argv)
		return (EX_TEMPFAIL);
	}

+
again:
	if (pkg_jobs_new(&jobs, PKG_JOBS_INSTALL, db) != EPKG_OK)
		goto cleanup;

@@ -246,7 +247,9 @@ exec_install(int argc, char **argv)
				printf("Conflicts with the existing packages "
				    "have been found.\nOne more solver "
				    "iteration is needed to resolve them.\n");
-
				continue;
+
				pkg_jobs_free(jobs);
+
				jobs = NULL;
+
				goto again;
			}
			else if (retcode != EPKG_OK)
				goto cleanup;
modified src/upgrade.c
@@ -163,6 +163,7 @@ exec_upgrade(int argc, char **argv)
		return (EX_TEMPFAIL);
	}

+
again:
	if (pkg_jobs_new(&jobs, PKG_JOBS_UPGRADE, db) != EPKG_OK)
		goto cleanup;

@@ -201,7 +202,9 @@ exec_upgrade(int argc, char **argv)
				printf("Conflicts with the existing packages "
				    "have been found.\nOne more solver "
				    "iteration is needed to resolve them.\n");
-
				continue;
+
				pkg_jobs_free(jobs);
+
				jobs = NULL;
+
				goto again;
			}
			else if (retcode != EPKG_OK)
				goto cleanup;