Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Remove deprecated option:
Baptiste Daroussin committed 12 years ago
commit 4bc7073308cb21d42e3af14fd5c4b80208a4ddee
parent 01ddfae
2 files changed +37 -95
modified libpkg/pkg_config.c
@@ -44,7 +44,6 @@
#include "private/pkg.h"
#include "private/event.h"

-
#define ABI_VAR_STRING "${ABI}"
#define REPO_NAME_PREFIX "repo-"

int eventpipe = -1;
@@ -63,16 +62,6 @@ ucl_object_t *config = NULL;
static struct config_entry c[] = {
	{
		PKG_STRING,
-
		"PACKAGESITE",
-
#ifdef DEFAULT_PACKAGESITE
-
		DEFAULT_PACKAGESITE,
-
#else
-
		NULL,
-
#endif
-
		"Repository URL",
-
	},
-
	{
-
		PKG_STRING,
		"PKG_DBDIR",
		"/var/db/pkg",
		"Where the package databases are stored",
@@ -94,12 +83,6 @@ static struct config_entry c[] = {
		"Location of the ports collection",
	},
	{
-
		PKG_STRING,
-
		"PUBKEY",
-
		NULL,
-
		"Public key for authenticating packages from the chosen repository",
-
	},
-
	{
		PKG_BOOL,
		"HANDLE_RC_SCRIPTS",
		"NO",
@@ -168,18 +151,6 @@ static struct config_entry c[] = {
		"URL giving location of the vulnxml database",
	},
	{
-
		PKG_STRING,
-
		"MIRROR_TYPE",
-
#if DEFAULT_MIRROR_TYPE == 1
-
		"SRV",
-
#elif DEFAULT_MIRROR_TYPE == 2
-
		"HTTP",
-
#else
-
		NULL,
-
#endif
-
		"How to locate alternate mirror sites of a repository (one of: 'SRV', 'HTTP')",
-
	},
-
	{
		PKG_INT,
		"FETCH_RETRY",
		"3",
@@ -886,32 +857,6 @@ parsed:
	return (EPKG_OK);
}

-
static char *
-
subst_packagesite_str(const char *oldstr)
-
{
-
	const char *myarch;
-
	struct sbuf *newval;
-
	const char *variable_string;
-
	ucl_object_t *o;
-
	char *res;
-

-
	variable_string = strstr(oldstr, ABI_VAR_STRING);
-
	if (variable_string == NULL)
-
		return strdup(oldstr);
-

-
	newval = sbuf_new_auto();
-
	sbuf_bcat(newval, oldstr, variable_string - oldstr);
-
	o = ucl_object_find_key(config, "ABI");
-
	sbuf_cat(newval, ucl_object_tostring_forced(o));
-
	sbuf_cat(newval, variable_string + strlen(ABI_VAR_STRING));
-
	sbuf_finish(newval);
-

-
	res = strdup(sbuf_data(newval));
-
	sbuf_free(newval);
-

-
	return res;
-
}
-

static struct pkg_repo *
pkg_repo_new(const char *name, const char *url)
{
@@ -920,7 +865,7 @@ pkg_repo_new(const char *name, const char *url)
	r = calloc(1, sizeof(struct pkg_repo));
	r->type = REPO_BINARY_PKGS;
	r->update = repo_update_binary_pkgs;
-
	r->url = subst_packagesite_str(url);
+
	r->url = strdup(url);
	r->signature_type = SIG_NONE;
	r->mirror_type = NOMIRROR;
	r->enable = true;
modified src/pkg.conf.5
@@ -78,43 +78,6 @@ when fetching the database file and packages.
This supports using
.Sy ${ABI}
to create a dynamic URL based on the ABI being used. (deprecated)
-
.It Cm MIRROR_TYPE: string
-
Specifies which mirror type to use for
-
.Sy PACKAGESITE .
-
Either
-
.Dv HTTP
-
or
-
.Dv SRV
-
or
-
.Dv NONE
-
can be used.
-
For a
-
.Cm MIRROR_TYPE
-
of
-
.Dv NONE ,
-
any of the URL schemes supported by
-
.Xr libfetch 3
-
can be used, including:
-
.Dv http:// ,
-
.Dv https:// ,
-
.Dv ftp:// ,
-
or
-
.Dv file://
-
plus
-
.Dv ssh:// .
-
Where
-
.Sy MIRROR_TYPE
-
is
-
.Dv SRV ,
-
you should use a
-
.Dv pkg+http://
-
or
-
.Dv pkg+https://
-
(etc.) URL scheme.
-
Using
-
.Dv http://
-
URLS implies that the hostname part is a simple hostname according to RFC 2616,
-
and is deprecated. (deprecated)
.It Cm PKG_CACHEDIR: string
Specifies the cache directory for packages.
The default value
@@ -246,11 +209,45 @@ above for the description of most options):
.It Cm myrepo:
.Bl -tag -width ".Cm MIRROR_TYPE: string"
.It Cm URL: string
-
PACKAGESITE for this repository only.
+
URL for this repository only.
.It Cm ENABLED: boolean
The repository will be used only if this option is enabled. (default: YES)
.It Cm MIRROR_TYPE: string
-
MIRROR_TYPE for this repository only. (default: NONE)
+
MIRROR_TYPE for this repository only. (default: NONE).
+
Either
+
.Dv HTTP
+
or
+
.Dv SRV
+
or
+
.Dv NONE
+
can be used.
+
For a
+
.Cm MIRROR_TYPE
+
of
+
.Dv NONE ,
+
any of the URL schemes supported by
+
.Xr libfetch 3
+
can be used, including:
+
.Dv http:// ,
+
.Dv https:// ,
+
.Dv ftp:// ,
+
or
+
.Dv file://
+
plus
+
.Dv ssh:// .
+
Where
+
.Sy MIRROR_TYPE
+
is
+
.Dv SRV ,
+
you should use a
+
.Dv pkg+http://
+
or
+
.Dv pkg+https://
+
(etc.) URL scheme.
+
Using
+
.Dv http://
+
URLS implies that the hostname part is a simple hostname according to RFC 2616,
+
and is deprecated.
.It Cm SIGNATURE_TYPE: string
Specifies what type of signature this repository uses.
Can be either