index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2015-10-16 20:28:23 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-10-18 10:59:23 +1000 |
commit | c261210ccf0a7d08c7b3f24aee40b7c8d900e6ac (patch) | |
tree | d9b2ac4e97450e5c36fef318e02c6eb170fec3f1 /lib/libalpm/alpm.c | |
parent | 46a1ac642907039a64f2ec93d352508b2ba3ba79 (diff) |
-rw-r--r-- | lib/libalpm/alpm.c | 5 |
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index d77b43ab..0798c0bc 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -50,6 +50,7 @@ alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath, { alpm_errno_t myerr; const char *lf = "db.lck"; + char *hookdir; size_t lockfilelen; alpm_handle_t *myhandle = _alpm_handle_new(); @@ -64,6 +65,10 @@ alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath, goto cleanup; } + MALLOC(hookdir, strlen(myhandle->root) + strlen(SYSHOOKDIR) + 1, goto cleanup); + sprintf(hookdir, "%s%s", myhandle->root, SYSHOOKDIR); + myhandle->hookdirs = alpm_list_add(NULL, hookdir); + /* set default database extension */ STRDUP(myhandle->dbext, ".db", goto cleanup); |