svn commit: r263623 - stable/9/usr.sbin/pkg
Bryan Drewery
bdrewery at FreeBSD.org
Sat Mar 22 10:44:43 UTC 2014
Author: bdrewery
Date: Sat Mar 22 10:44:42 2014
New Revision: 263623
URL: http://svnweb.freebsd.org/changeset/base/263623
Log:
MFC r263180:
Fix ABI from /usr/local/etc/pkg.conf not being respected.
Modified:
stable/9/usr.sbin/pkg/config.c
Directory Properties:
stable/9/usr.sbin/pkg/ (props changed)
Modified: stable/9/usr.sbin/pkg/config.c
==============================================================================
--- stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:42:01 2014 (r263622)
+++ stable/9/usr.sbin/pkg/config.c Sat Mar 22 10:44:42 2014 (r263623)
@@ -64,6 +64,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[] = {
@@ -74,6 +75,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+ false,
},
[ABI] = {
PKG_CONFIG_STRING,
@@ -82,6 +84,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+ true,
},
[MIRROR_TYPE] = {
PKG_CONFIG_STRING,
@@ -90,6 +93,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+ false,
},
[ASSUME_ALWAYS_YES] = {
PKG_CONFIG_BOOL,
@@ -98,6 +102,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+ true,
},
[SIGNATURE_TYPE] = {
PKG_CONFIG_STRING,
@@ -106,6 +111,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+ false,
},
[FINGERPRINTS] = {
PKG_CONFIG_STRING,
@@ -114,6 +120,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+ false,
},
[REPOS_DIR] = {
PKG_CONFIG_LIST,
@@ -122,6 +129,7 @@ static struct config_entry c[] = {
NULL,
NULL,
false,
+ true,
},
};
@@ -394,6 +402,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;
More information about the svn-src-stable-9
mailing list