From 165e492485aa7c3e3d94718dfdecf7a062f8af66 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Sun, 13 Jun 2021 13:28:16 +0100 Subject: [PATCH] pacman: don't run hooks when using --dbonly --dbonly is meant to only touch the database and not the actual system. However hooks still run which can leave files in place or run commands you may not want. The hooks being run also means `fakeroot pacman -S --dbpath test/ foo --dbonly` fails because alpm tries to chroot for hooks which requires real root. Signed-off-by: Allan McRae --- src/pacman/pacman.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index e398855a..db64e05a 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -634,6 +634,7 @@ static int parsearg_trans(int opt) case OP_DBONLY: config->flags |= ALPM_TRANS_FLAG_DBONLY; config->flags |= ALPM_TRANS_FLAG_NOSCRIPTLET; + config->flags |= ALPM_TRANS_FLAG_NOHOOKS; break; case OP_NOPROGRESSBAR: config->noprogressbar = 1;