lib: move conf parsing to lib/conf.c and refactor to not rely on getcwd/chdir

This fixes https://github.com/voidlinux/xbps/issues/158
This commit is contained in:
Duncaen
2019-03-06 14:34:23 +01:00
parent fa5911bb00
commit 85bf13f138
7 changed files with 587 additions and 446 deletions

View File

@ -594,6 +594,12 @@ struct xbps_handle {
* Full path to the xbps configuration directory.
*/
char confdir[XBPS_MAXPATH+sizeof(XBPS_SYSCONF_PATH)];
/**
* @var confdir
*
* Full path to the xbps configuration directory.
*/
char sysconfdir[XBPS_MAXPATH+sizeof(XBPS_SYSDEFCONF_PATH)];
/**
* @var rootdir
*

View File

@ -155,5 +155,6 @@ xbps_array_t HIDDEN xbps_get_pkg_fulldeptree(struct xbps_handle *,
const char *, bool);
struct xbps_repo HIDDEN *xbps_regget_repo(struct xbps_handle *,
const char *);
int HIDDEN xbps_conf_init(struct xbps_handle *);
#endif /* !_XBPS_API_IMPL_H_ */