libalpm appends the trailing / to the config root, no need to do it here
This commit is contained in:
parent
aa1c0ba9f8
commit
cb65f08d2f
1 changed files with 1 additions and 16 deletions
|
@ -486,27 +486,12 @@ int main(int argc, char *argv[])
|
||||||
config->root = PM_ROOT;
|
config->root = PM_ROOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *initroot = NULL;
|
|
||||||
/* add a trailing '/' if there isn't one */
|
|
||||||
if(config->root[strlen(config->root)-1] != '/') {
|
|
||||||
char *ptr;
|
|
||||||
MALLOC(ptr, strlen(config->root)+2);
|
|
||||||
strcpy(ptr, config->root);
|
|
||||||
strcat(ptr, "/");
|
|
||||||
initroot = ptr;
|
|
||||||
} else {
|
|
||||||
initroot = strdup(config->root);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* initialize pm library */
|
/* initialize pm library */
|
||||||
if(alpm_initialize(initroot) == -1) {
|
if(alpm_initialize(config->root) == -1) {
|
||||||
ERR(NL, _("failed to initilize alpm library (%s)\n"), alpm_strerror(pm_errno));
|
ERR(NL, _("failed to initilize alpm library (%s)\n"), alpm_strerror(pm_errno));
|
||||||
cleanup(1);
|
cleanup(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
FREE(initroot);
|
|
||||||
config->root = alpm_option_get_root();
|
|
||||||
|
|
||||||
/* Setup logging as soon as possible, to print out maximum debugging info */
|
/* Setup logging as soon as possible, to print out maximum debugging info */
|
||||||
alpm_option_set_logmask(config->debug);
|
alpm_option_set_logmask(config->debug);
|
||||||
alpm_option_set_logcb(cb_log);
|
alpm_option_set_logcb(cb_log);
|
||||||
|
|
Loading…
Add table
Reference in a new issue