Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Kill the old pkg_jobs_add rename pkg_jobs_append to pkg_jobs_name
Baptiste Daroussin committed 13 years ago
commit 02c79358590887648f5236be08e689c150deb0ff
parent 4853741
6 files changed +6 -23
modified libpkg/pkg.h
@@ -866,9 +866,7 @@ void pkg_jobs_free(struct pkg_jobs *jobs);
 * Add a pkg to the jobs queue.
 * @return An error code.
 */
-
int pkg_jobs_add(struct pkg_jobs *jobs, struct pkg *pkg);
-

-
int pkg_jobs_append(struct pkg_jobs *j, match_t match, char **argv, int argc, bool recursive);
+
int pkg_jobs_add(struct pkg_jobs *j, match_t match, char **argv, int argc, bool recursive);
int pkg_jobs_solve(struct pkg_jobs *j);
int pkg_jobs_find(struct pkg_jobs *j, const char *origin, struct pkg **pkg);
int pkg_jobs_set_repository(struct pkg_jobs *j, const char *name);
modified libpkg/pkg_jobs.c
@@ -105,7 +105,7 @@ pkg_jobs_free(struct pkg_jobs *j)
}

int
-
pkg_jobs_append(struct pkg_jobs *j, match_t match, char **argv, int argc,
+
pkg_jobs_add(struct pkg_jobs *j, match_t match, char **argv, int argc,
    bool recursive)
{
	struct job_pattern *jp;
@@ -289,21 +289,6 @@ pkg_jobs_find(struct pkg_jobs *j, const char *origin, struct pkg **p)
	return (EPKG_OK);
}

-
/* deprecated should die in the end */
-
int
-
pkg_jobs_add(struct pkg_jobs *j, struct pkg *pkg)
-
{
-
	char *origin;
-

-
	assert(j != NULL);
-
	assert(pkg != NULL);
-

-
	pkg_get(pkg, PKG_ORIGIN, &origin);
-
	HASH_ADD_KEYPTR(hh, j->jobs, origin, strlen(origin), pkg);
-

-
	return (EPKG_OK);
-
}
-

int
pkg_jobs_count(struct pkg_jobs *j)
{
modified pkg/check.c
@@ -151,7 +151,7 @@ fix_deps(struct pkgdb *db, struct deps_head *dh, int nbpkgs, bool yes)
		return (EPKG_FATAL);
	}

-
	if (pkg_jobs_append(jobs, MATCH_EXACT, pkgs, nbpkgs, false) == EPKG_FATAL) {
+
	if (pkg_jobs_add(jobs, MATCH_EXACT, pkgs, nbpkgs, false) == EPKG_FATAL) {
		pkg_jobs_free(jobs);
		return (EPKG_FATAL);
	}
modified pkg/delete.c
@@ -117,7 +117,7 @@ exec_delete(int argc, char **argv)
		return (EX_IOERR);
	}

-
	if (pkg_jobs_append(jobs, match, argv, argc, recursive) == EPKG_FATAL)
+
	if (pkg_jobs_add(jobs, match, argv, argc, recursive) == EPKG_FATAL)
		goto cleanup;

	if (pkg_jobs_solve(jobs) != EPKG_OK)
modified pkg/fetch.c
@@ -114,7 +114,7 @@ exec_fetch(int argc, char **argv)
	if (pkg_jobs_new(&jobs, PKG_JOBS_FETCH, db, force, false) != EPKG_OK)
		goto cleanup;

-
	if (pkg_jobs_append(jobs, match, argv, argc, false) != EPKG_OK)
+
	if (pkg_jobs_add(jobs, match, argv, argc, false) != EPKG_OK)
		goto cleanup;

	if (pkg_jobs_solve(jobs) != EPKG_OK)
modified pkg/install.c
@@ -134,7 +134,7 @@ exec_install(int argc, char **argv)
		goto cleanup;
	}

-
	if (pkg_jobs_append(jobs, match, argv, argc, false) == EPKG_FATAL)
+
	if (pkg_jobs_add(jobs, match, argv, argc, false) == EPKG_FATAL)
		goto cleanup;

	if (pkg_jobs_solve(jobs) != EPKG_OK)