Commit 424129e8 authored by Morgan Adamiec's avatar Morgan Adamiec Committed by Allan McRae
Browse files

pacman: clarify error when alpm fails to init



Currently pacman is hard coded to print the dbpath, then the error alpm
returned. Even though the error could really be caused by anything.

So instead just print the arugemnts given to alpm and not assume the
resulting error message is releated to either path.

Fixes FS#59595

Signed-off-by: Morgan Adamiec's avatarmorganamilo <morganamilo@gmail.com>
Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>
parent 27955a0f
......@@ -766,8 +766,8 @@ static int setup_libalpm(void)
/* initialize library */
handle = alpm_initialize(config->rootdir, config->dbpath, &err);
if(!handle) {
pm_printf(ALPM_LOG_ERROR, _("failed to initialize alpm library\n(%s: %s)\n"),
alpm_strerror(err), config->dbpath);
pm_printf(ALPM_LOG_ERROR, _("failed to initialize alpm library:\n(root: %s, dbpath: %s)\n%s\n"),
config->rootdir, config->dbpath, alpm_strerror(err));
if(err == ALPM_ERR_DB_VERSION) {
fprintf(stderr, _("try running pacman-db-upgrade\n"));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment