Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated
Reported by: glebius MFC after: 3 days
This commit is contained in:
parent
1eafa5d8b0
commit
d8d2111e85
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258550
@ -740,12 +740,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;
|
||||
@ -754,7 +751,6 @@ bootstrap_pkg(bool force)
|
||||
|
||||
fd_sig = -1;
|
||||
ret = -1;
|
||||
config = NULL;
|
||||
|
||||
if (config_string(PACKAGESITE, &packagesite) != 0) {
|
||||
warnx("No PACKAGESITE defined");
|
||||
@ -801,26 +797,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:
|
||||
|
Loading…
Reference in New Issue
Block a user