svn commit: r263621 - stable/10/usr.sbin/pkg
Bryan Drewery
bdrewery at FreeBSD.org
Sat Mar 22 10:40:04 UTC 2014
Author: bdrewery
Date: Sat Mar 22 10:40:04 2014
New Revision: 263621
URL: http://svnweb.freebsd.org/changeset/base/263621
Log:
MFC r263180:
Fix ABI from /usr/local/etc/pkg.conf not being respected.
Modified:
stable/10/usr.sbin/pkg/config.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/usr.sbin/pkg/config.c
==============================================================================
--- stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:26:09 2014 (r263620)
+++ stable/10/usr.sbin/pkg/config.c Sat Mar 22 10:40:04 2014 (r263621)
@@ -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;
More information about the svn-src-stable
mailing list