MFC r258550:

Do not create pkg.conf, as it is not necessary anymore
  and packagesite is deprecated

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
gjb 2013-11-30 17:33:49 +00:00
parent be650673e4
commit b7e8f6268b

View File

@ -747,12 +747,9 @@ verify_signature(int fd_pkg, int fd_sig)
static int
bootstrap_pkg(bool force)
{
FILE *config;
int fd_pkg, fd_sig;
int ret;
char *site;
char url[MAXPATHLEN];
char conf[MAXPATHLEN];
char tmppkg[MAXPATHLEN];
char tmpsig[MAXPATHLEN];
const char *packagesite;
@ -761,7 +758,6 @@ bootstrap_pkg(bool force)
fd_sig = -1;
ret = -1;
config = NULL;
if (config_string(PACKAGESITE, &packagesite) != 0) {
warnx("No PACKAGESITE defined");
@ -808,26 +804,6 @@ bootstrap_pkg(bool force)
if ((ret = extract_pkg_static(fd_pkg, pkgstatic, MAXPATHLEN)) == 0)
ret = install_pkg_static(pkgstatic, tmppkg, force);
snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf",
getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE);
if (access(conf, R_OK) == -1) {
site = strrchr(url, '/');
if (site == NULL)
goto cleanup;
site[0] = '\0';
site = strrchr(url, '/');
if (site == NULL)
goto cleanup;
site[0] = '\0';
config = fopen(conf, "w+");
if (config == NULL)
goto cleanup;
fprintf(config, "packagesite: %s\n", url);
fclose(config);
}
goto cleanup;
fetchfail: