diff options
author | Allan McRae <allan@archlinux.org> | 2013-07-21 16:10:25 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-07-30 13:01:11 +1000 |
commit | e81faa9d6d2ac910720a9a87a9f469b80cf106e5 (patch) | |
tree | 0161d0bc008b4c8a9f2a5c3deae6ec451b8ae578 /src/pacman | |
parent | 640324f1d4a63709822f61a9647e06d95e6c0c21 (diff) |
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 <allan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/check.c | 18 |
1 files changed, 12 insertions, 6 deletions
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) { |