xbps_init: don't panic if conf_dictionary cannot be internalized, just continue.
This commit is contained in:
parent
51bee11bfa
commit
20c36d73ef
@ -73,10 +73,14 @@ xbps_init(struct xbps_handle *xh)
|
|||||||
xhp->conf_dictionary =
|
xhp->conf_dictionary =
|
||||||
prop_dictionary_internalize_from_file(xhp->conffile);
|
prop_dictionary_internalize_from_file(xhp->conffile);
|
||||||
if (xhp->conf_dictionary == NULL) {
|
if (xhp->conf_dictionary == NULL) {
|
||||||
xbps_dbg_printf("%s: cannot internalize conf "
|
if (errno != ENOENT) {
|
||||||
"dictionary: %s\n", strerror(errno));
|
xbps_dbg_printf("%s: cannot internalize conf "
|
||||||
xbps_end();
|
"dictionary: %s\n", strerror(errno));
|
||||||
return errno;
|
xbps_end();
|
||||||
|
return errno;
|
||||||
|
}
|
||||||
|
xbps_dbg_printf("%s: conf_dictionary not internalized.\n",
|
||||||
|
__func__);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Initialize repository pool.
|
* Initialize repository pool.
|
||||||
|
@ -173,6 +173,8 @@ find_virtualpkg_user_in_conf(const char *vpkg, bool bypattern)
|
|||||||
char *vpkgname = NULL;
|
char *vpkgname = NULL;
|
||||||
|
|
||||||
xhp = xbps_handle_get();
|
xhp = xbps_handle_get();
|
||||||
|
if (xhp->conf_dictionary == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if ((iter = xbps_array_iter_from_dict(xhp->conf_dictionary,
|
if ((iter = xbps_array_iter_from_dict(xhp->conf_dictionary,
|
||||||
"package-virtual")) == NULL)
|
"package-virtual")) == NULL)
|
||||||
|
@ -62,6 +62,8 @@ xbps_repository_pool_init(void)
|
|||||||
bool duprepo;
|
bool duprepo;
|
||||||
|
|
||||||
xhp = xbps_handle_get();
|
xhp = xbps_handle_get();
|
||||||
|
if (xhp->conf_dictionary == NULL)
|
||||||
|
return ENOTSUP;
|
||||||
|
|
||||||
if (repolist_initialized)
|
if (repolist_initialized)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user