From owner-svn-src-head@FreeBSD.ORG Fri Mar 14 17:20:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B51E3E7; Fri, 14 Mar 2014 17:20:46 +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 4E7436DC; Fri, 14 Mar 2014 17:20:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2EHKkUr095753; Fri, 14 Mar 2014 17:20:46 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2EHKkte095752; Fri, 14 Mar 2014 17:20:46 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403141720.s2EHKkte095752@svn.freebsd.org> From: Bryan Drewery Date: Fri, 14 Mar 2014 17:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263180 - head/usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2014 17:20:46 -0000 Author: bdrewery Date: Fri Mar 14 17:20:45 2014 New Revision: 263180 URL: http://svnweb.freebsd.org/changeset/base/263180 Log: Fix ABI from /usr/local/etc/pkg.conf not being respected. Regression from r259266. Sponsored by: EMC / Isilon Storage Division MFC after: 1 week Modified: head/usr.sbin/pkg/config.c Modified: head/usr.sbin/pkg/config.c ============================================================================== --- head/usr.sbin/pkg/config.c Fri Mar 14 17:20:23 2014 (r263179) +++ head/usr.sbin/pkg/config.c Fri Mar 14 17:20:45 2014 (r263180) @@ -66,6 +66,7 @@ struct config_entry { char *value; STAILQ_HEAD(, config_value) *list; bool envset; + bool main_only; /* Only set in pkg.conf. */ }; static struct config_entry c[] = { @@ -76,6 +77,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [ABI] = { PKG_CONFIG_STRING, @@ -84,6 +86,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, [MIRROR_TYPE] = { PKG_CONFIG_STRING, @@ -92,6 +95,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [ASSUME_ALWAYS_YES] = { PKG_CONFIG_BOOL, @@ -100,6 +104,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, [SIGNATURE_TYPE] = { PKG_CONFIG_STRING, @@ -108,6 +113,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [FINGERPRINTS] = { PKG_CONFIG_STRING, @@ -116,6 +122,7 @@ static struct config_entry c[] = { NULL, NULL, false, + false, }, [REPOS_DIR] = { PKG_CONFIG_LIST, @@ -124,6 +131,7 @@ static struct config_entry c[] = { NULL, NULL, false, + true, }, }; @@ -597,6 +605,9 @@ config_parse(ucl_object_t *obj, pkg_conf for (i = 0; i < CONFIG_SIZE; i++) { if (c[i].envset) continue; + /* Prevent overriding ABI, ASSUME_ALWAYS_YES, etc. */ + if (conftype != CONFFILE_PKG && c[i].main_only == true) + continue; switch (c[i].type) { case PKG_CONFIG_LIST: c[i].list = temp_config[i].list;