Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
libpkg: Remove an unused parameter from pkg_jobs_universe_add_pkg()
Mark Johnston committed 7 months ago
commit f88fd01303ec1e048208e86076dde58c3b52558d
parent 7a64b3f
3 files changed +8 -7
modified libpkg/pkg_jobs.c
@@ -395,7 +395,7 @@ pkg_jobs_add_req(struct pkg_jobs *j, struct pkg *pkg)

	dbg(4, "add package %s-%s to the request", pkg->name,
			pkg->version);
-
	rc = pkg_jobs_universe_add_pkg(j->universe, pkg, false, &un);
+
	rc = pkg_jobs_universe_add_pkg(j->universe, pkg, &un);

	if (rc == EPKG_END) {
		/*
@@ -950,7 +950,7 @@ pkg_jobs_find_upgrade(struct pkg_jobs *j, const char *pattern, match_t m)

		dbg(2, "non-automatic package with pattern %s has not been found in "
				"remote repo", pattern);
-
		rc = pkg_jobs_universe_add_pkg(j->universe, p, false, &unit);
+
		rc = pkg_jobs_universe_add_pkg(j->universe, p, &unit);
		if (rc == EPKG_OK) {
			rc = pkg_jobs_guess_upgrade_candidate(j, pattern);
		}
modified libpkg/pkg_jobs_universe.c
@@ -151,7 +151,7 @@ pkg_jobs_universe_get_remote(struct pkg_jobs_universe *universe,
 */
int
pkg_jobs_universe_add_pkg(struct pkg_jobs_universe *universe, struct pkg *pkg,
-
		bool force __unused, struct pkg_job_universe_item **found)
+
    struct pkg_job_universe_item **found)
{
	struct pkg_job_universe_item *item, *seen, *tmp = NULL;

@@ -575,7 +575,7 @@ pkg_jobs_universe_process_item(struct pkg_jobs_universe *universe, struct pkg *p
	 * Add pkg itself. If package is already seen then we check the `processed`
	 * flag that means that we have already tried to check our universe
	 */
-
	rc = pkg_jobs_universe_add_pkg(universe, pkg, false, &found);
+
	rc = pkg_jobs_universe_add_pkg(universe, pkg, &found);
	if (rc == EPKG_CONFLICT)
		return (rc);

@@ -1036,12 +1036,13 @@ pkg_jobs_universe_get_upgrade_candidates(struct pkg_jobs_universe *universe,

	if (lp != NULL) {
		/* Add local package to the universe as well */
-
		pkg_jobs_universe_add_pkg(universe, lp, false, NULL);
+
		pkg_jobs_universe_add_pkg(universe, lp, NULL);
	}
	if (selected != lp) {
		/* We need to add the whole chain of upgrade candidates */
		vec_rforeach(candidates, i) {
-
			pkg_jobs_universe_add_pkg(universe, candidates.d[i], force, NULL);
+
			pkg_jobs_universe_add_pkg(universe, candidates.d[i],
+
			    NULL);
		}
	}
	else {
modified libpkg/private/pkg_jobs.h
@@ -206,7 +206,7 @@ struct pkg_job_universe_item* pkg_jobs_universe_find(struct pkg_jobs_universe
 * Add a single package to the universe
 */
int pkg_jobs_universe_add_pkg(struct pkg_jobs_universe *universe,
-
	struct pkg *pkg, bool force, struct pkg_job_universe_item **found);
+
	struct pkg *pkg, struct pkg_job_universe_item **found);

/*
 * Find local package in db or universe