Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Isolate update per repo type
Baptiste Daroussin committed 12 years ago
commit 62e7e8f40a9909e7c1356801afe8f1652a37e1b0
parent 7239742
1 file changed +13 -2
modified libpkg/update.c
@@ -1,4 +1,5 @@
/*-
+
 * Copyright (c) 2012-2014 Baptiste Daroussin <bapt@FreeBSD.org>
 * Copyright (c) 2012 Julien Laffaye <jlaffaye@FreeBSD.org>
 * All rights reserved.
 *
@@ -809,8 +810,8 @@ cleanup:
	return (rc);
}

-
int
-
pkg_update(struct pkg_repo *repo, bool force)
+
static int
+
update_binary_pkgs(struct pkg_repo *repo, bool force)
{
	char repofile[MAXPATHLEN];

@@ -908,3 +909,13 @@ cleanup:

	return (res);
}
+

+
int
+
pkg_update(struct pkg_repo *repo, bool force)
+
{
+
	switch (repo->type) {
+
	case REPO_BINARY_PKGS:
+
		return (update_binary_pkgs(repo, force));
+
		break;
+
	}
+
};