summaryrefslogtreecommitdiffstats
path: root/po/pacman.pot
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-01 21:31:50 +0200
committerDan McGee <dan@archlinux.org>2011-04-01 21:31:50 +0200
commit39fd8bc318d4a90aab704f892cd80c22f5c7345f (patch)
treef664a223aaf42a25c4abf36295988933cd6c0cbe /po/pacman.pot
parent20c4928ee155db7b43b9f5b440a2cb199f178bb4 (diff)
downloadpacman-39fd8bc318d4a90aab704f892cd80c22f5c7345f.tar.gz
pacman-39fd8bc318d4a90aab704f892cd80c22f5c7345f.tar.xz
Ensure dbpath is not null when populating sync database
We didn't do this sanity check before trying to open an archive. If the alpm dbpath wasn't set, the sync database dbpath would be NULL, causing us to hang indefinitely in archive_read_open_filename() rather than erroring out. We already have a corresponding check in local_db_populate(). The following program will test this case, and hangs before this patch without the call to set_dbpath: int main(int argc, char *argv[]) { alpm_initialize(); // alpm_option_set_dbpath("/var/lib/pacman/"); pmdb_t *core = alpm_db_register_sync("core"); pmpkg_t *pkg = alpm_db_get_pkg(core, "pacman"); return 0; } Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'po/pacman.pot')
0 files changed, 0 insertions, 0 deletions