mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 17:31:52 -05:00
fixed dbpath initialization (found out by VMiklos <vmiklos@frugalware.org>)
This commit is contained in:
parent
839a64df41
commit
25ca241a7c
@ -476,9 +476,14 @@ int main(int argc, char *argv[])
|
||||
ERR(NL, "failed to set option LOGCB (%s)\n", alpm_strerror(pm_errno));
|
||||
cleanup(1);
|
||||
}
|
||||
if(alpm_set_option(PM_OPT_DBPATH, (long)config->dbpath) == -1) {
|
||||
ERR(NL, "failed to set option DBPATH (%s)\n", alpm_strerror(pm_errno));
|
||||
cleanup(1);
|
||||
if(config->dbpath == NULL) {
|
||||
config->dbpath = strdup(PM_DBPATH);
|
||||
} else {
|
||||
/* dbpath has been set by parseargs or parseconfig */
|
||||
if(alpm_set_option(PM_OPT_DBPATH, (long)config->dbpath) == -1) {
|
||||
ERR(NL, "failed to set option DBPATH (%s)\n", alpm_strerror(pm_errno));
|
||||
cleanup(1);
|
||||
}
|
||||
}
|
||||
if(alpm_set_option(PM_OPT_CACHEDIR, (long)config->cachedir) == -1) {
|
||||
ERR(NL, "failed to set option CACHEDIR (%s)\n", alpm_strerror(pm_errno));
|
||||
|
Loading…
x
Reference in New Issue
Block a user