Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix crash with 'pkg (upgrade|install|upgrade) -r REPO'
Bryan Drewery committed 12 years ago
commit 5486f0f1ce83483a7dd60886ce033880ffb80808
parent 3eff4f1
1 file changed +2 -4
modified libpkg/pkg_jobs.c
@@ -77,14 +77,12 @@ pkg_jobs_set_flags(struct pkg_jobs *j, pkg_flags flags)
int
pkg_jobs_set_repository(struct pkg_jobs *j, const char *ident)
{
-
	struct pkg_repo *r;
-

-
	if ((r = pkg_repo_find_ident(ident)) == NULL) {
+
	if ((pkg_repo_find_ident(ident)) == NULL) {
		pkg_emit_error("Unknown repository: %s", ident);
		return (EPKG_FATAL);
	}

-
	j->reponame = pkg_repo_name(r);
+
	j->reponame = ident;

	return (EPKG_OK);
}