Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Try to fix logic in dependencies handling.
Vsevolod Stakhov committed 9 years ago
commit 7dcb968b7b92e405dfc1a4419b0c773dc11f8196
parent 611f09f
1 file changed +9 -1
modified libpkg/pkg_jobs_universe.c
@@ -310,6 +310,7 @@ pkg_jobs_universe_process_deps(struct pkg_jobs_universe *universe,
			 * XXX: this is the proper place to expand flexible dependencies
			 */

+
			found = false;
			/* Iteration one */
			for (int i = 0; i < kv_size(*rpkgs); i++) {
				rpkg = kv_A(*rpkgs, i);
@@ -337,7 +338,9 @@ pkg_jobs_universe_process_deps(struct pkg_jobs_universe *universe,

					/* Special case if we cannot find any package */
					if (npkg == NULL && rc != EPKG_OK) {
-
						break;
+
						kv_destroy(*rpkgs);
+
						free(rpkgs);
+
						return (rc);
					}
				}
			}
@@ -352,6 +355,11 @@ pkg_jobs_universe_process_deps(struct pkg_jobs_universe *universe,
				}

				rc = pkg_jobs_universe_process_item(universe, rpkg, NULL);
+
				if (npkg == NULL && rc != EPKG_OK) {
+
					kv_destroy(*rpkgs);
+
					free(rpkgs);
+
					return (rc);
+
				}
			}

			kv_destroy(*rpkgs);