Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Reactivate -r reponame in all command that supports it
Baptiste Daroussin committed 13 years ago
commit 52ee570eb7f9650f295ace759550b5242ae3db2e
parent 8a25d05
3 files changed +12 -3
modified pkg/fetch.c
@@ -55,7 +55,7 @@ exec_fetch(int argc, char **argv)
{
	struct pkgdb	*db = NULL;
	struct pkg_jobs	*jobs = NULL;
-
	const char	__unused *reponame = NULL;
+
	const char	*reponame = NULL;
	int		 ch;
	int		 retcode = EX_SOFTWARE;
	bool		 auto_update;
@@ -158,6 +158,9 @@ exec_fetch(int argc, char **argv)
	if (pkg_jobs_new(&jobs, PKG_JOBS_FETCH, db) != EPKG_OK)
		goto cleanup;

+
	if (reponame != NULL)
+
		pkg_jobs_set_repository(jobs, reponame);
+

	pkg_jobs_set_flags(jobs, f);

	if (!upgrades_for_installed &&
modified pkg/install.c
@@ -56,7 +56,7 @@ exec_install(int argc, char **argv)
{
	struct pkgdb *db = NULL;
	struct pkg_jobs *jobs = NULL;
-
	const char __unused *reponame = NULL;
+
	const char *reponame = NULL;
	int retcode;
	int updcode = EPKG_OK;
	int ch;
@@ -157,6 +157,9 @@ exec_install(int argc, char **argv)
	if (pkg_jobs_new(&jobs, PKG_JOBS_INSTALL, db) != EPKG_OK)
		goto cleanup;

+
	if (reponame != NULL)
+
		pkg_jobs_set_repository(jobs, reponame);
+

	pkg_jobs_set_flags(jobs, f);

	if (pkg_jobs_add(jobs, match, argv, argc) == EPKG_FATAL)
modified pkg/upgrade.c
@@ -48,7 +48,7 @@ exec_upgrade(int argc, char **argv)
{
	struct pkgdb *db = NULL;
	struct pkg_jobs *jobs = NULL;
-
	const char __unused *reponame = NULL;
+
	const char *reponame = NULL;
	int retcode;
	int updcode;
	int ch;
@@ -134,6 +134,9 @@ exec_upgrade(int argc, char **argv)
	if (pkg_jobs_new(&jobs, PKG_JOBS_UPGRADE, db) != EPKG_OK)
		goto cleanup;

+
	if (reponame != NULL)
+
		pkg_jobs_set_repository(jobs, reponame);
+

	pkg_jobs_set_flags(jobs, f);

	if (pkg_jobs_solve(jobs) != EPKG_OK)