summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-10-17 02:28:23 +0200
committerAllan McRae <allan@archlinux.org>2015-10-18 02:59:23 +0200
commitc261210ccf0a7d08c7b3f24aee40b7c8d900e6ac (patch)
treed9b2ac4e97450e5c36fef318e02c6eb170fec3f1 /lib/libalpm/alpm.c
parent46a1ac642907039a64f2ec93d352508b2ba3ba79 (diff)
downloadpacman-c261210ccf0a7d08c7b3f24aee40b7c8d900e6ac.tar.gz
pacman-c261210ccf0a7d08c7b3f24aee40b7c8d900e6ac.tar.xz
handle: add hookdirs option
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c5
1 files changed, 5 insertions, 0 deletions
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);