summaryrefslogtreecommitdiffstats
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-03-30 18:48:15 +0200
committerDan McGee <dan@archlinux.org>2009-07-23 03:13:53 +0200
commitca6ef852f9944ad31e8a136f7faf71da2c5fb57f (patch)
treeddc13ce9e32a17c4c916720cf0e290fb7175c60b /src/pacman/pacman.c
parent4b21504ffc947d39a0c69a774fe14a37262942a8 (diff)
downloadpacman-ca6ef852f9944ad31e8a136f7faf71da2c5fb57f.tar.gz
pacman-ca6ef852f9944ad31e8a136f7faf71da2c5fb57f.tar.xz
New feature: files verification
This implements FS#13877. Add a new option "-Qk" which checks if all of the files for a given package (or packages) are really on the system (i.e. not accidentally deleted). This can be combined with filters and other display options. It also respects both the --quiet and --verbose flags to give varying levels of output. Based on the original patch by Charly Coste <changaco@laposte.net>, thanks for your work! Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 7f864891..48d45ad1 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -108,6 +108,7 @@ static void usage(int op, const char * const myname)
printf(_(" -e, --explicit list packages explicitly installed [filter]\n"));
printf(_(" -g, --groups view all members of a package group\n"));
printf(_(" -i, --info view package information (-ii for backup files)\n"));
+ printf(_(" -k, --check check that the files owned by the package(s) are present\n"));
printf(_(" -l, --list list the contents of the queried package\n"));
printf(_(" -m, --foreign list installed packages not found in sync db(s) [filter]\n"));
printf(_(" -o, --owns <file> query the package that owns <file>\n"));
@@ -345,6 +346,7 @@ static int parseargs(int argc, char *argv[])
{"help", no_argument, 0, 'h'},
{"info", no_argument, 0, 'i'},
{"dbonly", no_argument, 0, 'k'},
+ {"check", no_argument, 0, 'k'},
{"list", no_argument, 0, 'l'},
{"foreign", no_argument, 0, 'm'},
{"nosave", no_argument, 0, 'n'},
@@ -473,7 +475,10 @@ static int parseargs(int argc, char *argv[])
case 'g': (config->group)++; break;
case 'h': config->help = 1; break;
case 'i': (config->op_q_info)++; (config->op_s_info)++; break;
- case 'k': config->flags |= PM_TRANS_FLAG_DBONLY; break;
+ case 'k':
+ config->flags |= PM_TRANS_FLAG_DBONLY;
+ config->op_q_check = 1;
+ break;
case 'l': config->op_q_list = 1; break;
case 'm': config->op_q_foreign = 1; break;
case 'n': config->flags |= PM_TRANS_FLAG_NOSAVE; break;