[pacman-dev] [PATCH] Ensure --print doesn't enable --noconfirm when not expected

Dan McGee dan at archlinux.org
Mon May 16 12:54:06 EDT 2011


This is at best a hack around the way we currently do our --print magic,
but at least prevents someone from shooting themselves in the foot as
indicated in FS#24287.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 src/pacman/pacman.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 0ad0354..8bdb216 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -1416,7 +1416,7 @@ int main(int argc, char *argv[])
 	}
 
 	/* set up the print operations */
-	if(config->print) {
+	if(config->print && !config->op_s_clean) {
 		config->noconfirm = 1;
 		config->flags |= PM_TRANS_FLAG_NOCONFLICTS;
 		config->flags |= PM_TRANS_FLAG_NOLOCK;
-- 
1.7.5.1



More information about the pacman-dev mailing list