Date: Mon, 25 Nov 2013 11:31:42 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258550 - head/usr.sbin/pkg Message-ID: <201311251131.rAPBVgpP013215@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Mon Nov 25 11:31:42 2013 New Revision: 258550 URL: http://svnweb.freebsd.org/changeset/base/258550 Log: Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated Reported by: glebius MFC after: 3 days Modified: head/usr.sbin/pkg/pkg.c Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Mon Nov 25 11:15:51 2013 (r258549) +++ head/usr.sbin/pkg/pkg.c Mon Nov 25 11:31:42 2013 (r258550) @@ -740,12 +740,9 @@ cleanup: 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311251131.rAPBVgpP013215>