From e81faa9d6d2ac910720a9a87a9f469b80cf106e5 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 21 Jul 2013 16:10:25 +1000 Subject: Warn when directory ownership differs between filesystem and package We currently only warn if a directory's permissions differ, but using -Qkk on my system shows that directory permissions tend to change in packages reasonably frequently without notice. Provide a warning in such cases so that it can be altered. Example output: (1/1) reinstalling nginx warning: directory ownership differs on /var/lib/nginx/proxy/ filesystem: 33:0 package: 0:0 Signed-off-by: Allan McRae --- src/pacman/check.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/pacman/check.c') diff --git a/src/pacman/check.c b/src/pacman/check.c index cdd3744b..6c8889fc 100644 --- a/src/pacman/check.c +++ b/src/pacman/check.c @@ -106,9 +106,12 @@ static int check_file_time(const char *pkgname, const char *filepath, { if(st->st_mtime != archive_entry_mtime(entry)) { if(backup) { - printf("%s%s%s: ", config->colstr.title, _("backup file"), config->colstr.nocolor); - printf(_("%s: %s (Modification time mismatch)\n"), - pkgname, filepath); + if(!config->quiet) { + printf("%s%s%s: ", config->colstr.title, _("backup file"), + config->colstr.nocolor); + printf(_("%s: %s (Modification time mismatch)\n"), + pkgname, filepath); + } return 0; } if(!config->quiet) { @@ -150,9 +153,12 @@ static int check_file_size(const char *pkgname, const char *filepath, { if(st->st_size != archive_entry_size(entry)) { if(backup) { - printf("%s%s%s: ", config->colstr.title, _("backup file"), config->colstr.nocolor); - printf(_("%s: %s (Size mismatch)\n"), - pkgname, filepath); + if(!config->quiet) { + printf("%s%s%s: ", config->colstr.title, _("backup file"), + config->colstr.nocolor); + printf(_("%s: %s (Size mismatch)\n"), + pkgname, filepath); + } return 0; } if(!config->quiet) { -- cgit v1.2.3-24-g4f1b