summaryrefslogtreecommitdiffstats
path: root/src/pacman/conf.h
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-16 06:31:57 +0200
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-17 01:41:35 +0200
commitfae33a1faf3f94ea46049664ef483b2a3e0d3f01 (patch)
treee33404cef3acbbf18b774a33eab3006a7b986c5e /src/pacman/conf.h
parent6a4c6a02de9b45abe4c0f78c4f5d14d92d3359d6 (diff)
downloadpacman-fae33a1faf3f94ea46049664ef483b2a3e0d3f01.tar.gz
pacman-fae33a1faf3f94ea46049664ef483b2a3e0d3f01.tar.xz
add --sysroot option
--root is not sufficient to properly operate on a mounted guest system. Using --root still uses the host system's configuration and there is no way to correctly use the guest configuration without manually modifying any Include directives. --sysroot provides an easier way to operate on a guest system by chrooting immediately after option parsing before configuration parsing or performing any operations. It is currently limited to the root user, but that's enough for restoring a guest system to a working state, which is the primary intended use case. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Diffstat (limited to 'src/pacman/conf.h')
-rw-r--r--src/pacman/conf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index e67f7c51..53b44be6 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -67,6 +67,7 @@ typedef struct __config_t {
char *dbpath;
char *logfile;
char *gpgdir;
+ char *sysroot;
alpm_list_t *hookdirs;
alpm_list_t *cachedirs;
@@ -195,6 +196,7 @@ enum {
OP_PRINT,
OP_QUIET,
OP_ROOT,
+ OP_SYSROOT,
OP_RECURSIVE,
OP_SEARCH,
OP_REGEX,