diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2014-03-14 17:20:45 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2014-03-14 17:20:45 +0000 |
commit | 65409583499b1edf5b3d65b0ce1eff00fc6bef91 (patch) | |
tree | 91cd0650185249ac6898f6ee3bc4f5d68d44c97e /usr.sbin/pkg | |
parent | 719f6240769fc00b968e7eb4b6f223a6d89278a3 (diff) | |
download | FreeBSD-src-65409583499b1edf5b3d65b0ce1eff00fc6bef91.zip FreeBSD-src-65409583499b1edf5b3d65b0ce1eff00fc6bef91.tar.gz |
Fix ABI from /usr/local/etc/pkg.conf not being respected.
Regression from r259266.
Sponsored by: EMC / Isilon Storage Division
MFC after: 1 week
Diffstat (limited to 'usr.sbin/pkg')
-rw-r--r-- | usr.sbin/pkg/config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index a6250c7..db4a434 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -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_file_t conftype) 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; |