From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 17:33:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6982AFB7; Sat, 30 Nov 2013 17:33:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 550901EAD; Sat, 30 Nov 2013 17:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUHXo4L038327; Sat, 30 Nov 2013 17:33:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUHXosr038326; Sat, 30 Nov 2013 17:33:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311301733.rAUHXosr038326@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 17:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258773 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:33:50 -0000 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: