From ba467779bb0faa6ea81d91759c2224592091bbe3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 16 May 2011 11:52:49 -0500 Subject: Ensure --print doesn't enable --noconfirm when not expected 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 --- src/pacman/pacman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pacman') diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 0ad03540..8bdb216e 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; -- cgit v1.2.3-70-g09d2 From f2c4e7e55220addef0581d1c38cc7363b5a0884c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 19 May 2011 16:59:53 -0500 Subject: Coding style cleanups; add a null check Signed-off-by: Dan McGee --- src/pacman/pacman.c | 3 ++- src/pacman/query.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/pacman') diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 8bdb216e..347d8af9 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -1265,8 +1265,9 @@ static void cl_to_log(int argc, char* argv[]) size += strlen(argv[i]) + 1; } char *cl_text = malloc(size); - if(!cl_text) + if(!cl_text) { return; + } char *p = cl_text; for(i = 0; iquiet) { + if(!config->quiet) { printf(_("%s is owned by %s %s\n"), filename, alpm_pkg_get_name(info), alpm_pkg_get_version(info)); } else { -- cgit v1.2.3-70-g09d2