svn commit: r258773 - stable/10/usr.sbin/pkg

Glen Barber gjb at FreeBSD.org
Sat Nov 30 17:33:50 UTC 2013


Author: gjb
Date: Sat Nov 30 17:33:49 2013
New Revision: 258773
URL: http://svnweb.freebsd.org/changeset/base/258773

Log:
  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

Modified:
  stable/10/usr.sbin/pkg/pkg.c
Directory Properties:
  stable/10/usr.sbin/pkg/   (props changed)

Modified: stable/10/usr.sbin/pkg/pkg.c
==============================================================================
--- stable/10/usr.sbin/pkg/pkg.c	Sat Nov 30 17:31:04 2013	(r258772)
+++ stable/10/usr.sbin/pkg/pkg.c	Sat Nov 30 17:33:49 2013	(r258773)
@@ -747,12 +747,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;
@@ -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:


More information about the svn-src-all mailing list