summaryrefslogtreecommitdiff
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 6f05c68c..fce0131c 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -1,7 +1,7 @@
/*
* pacman.c
*
- * Copyright (c) 2006-2014 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2006-2015 Pacman Development Team <pacman-dev@archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -169,6 +169,7 @@ static void usage(int op, const char * const myname)
printf("%s:\n", str_opt);
addlist(_(" --asdeps mark packages as non-explicitly installed\n"));
addlist(_(" --asexplicit mark packages as explicitly installed\n"));
+ addlist(_(" -k, --check test local database for validity (-kk for sync databases)\n"));
} else if(op == PM_OP_DEPTEST) {
printf("%s: %s {-T --deptest} [%s] [%s]\n", str_usg, myname, str_opt, str_pkg);
printf("%s:\n", str_opt);
@@ -223,7 +224,7 @@ static void version(void)
{
printf("\n");
printf(" .--. Pacman v%s - libalpm v%s\n", PACKAGE_VERSION, alpm_version());
- printf("/ _.-' .-. .-. .-. Copyright (C) 2006-2014 Pacman Development Team\n");
+ printf("/ _.-' .-. .-. .-. Copyright (C) 2006-2015 Pacman Development Team\n");
printf("\\ '-. '-' '-' '-' Copyright (C) 2002-2006 Judd Vinet\n");
printf(" '--'\n");
printf(_(" This program may be freely redistributed under\n"
@@ -484,9 +485,18 @@ static int parsearg_global(int opt)
static int parsearg_database(int opt)
{
switch(opt) {
- case OP_ASDEPS: config->flags |= ALPM_TRANS_FLAG_ALLDEPS; break;
- case OP_ASEXPLICIT: config->flags |= ALPM_TRANS_FLAG_ALLEXPLICIT; break;
- default: return 1;
+ case OP_ASDEPS:
+ config->flags |= ALPM_TRANS_FLAG_ALLDEPS;
+ break;
+ case OP_ASEXPLICIT:
+ config->flags |= ALPM_TRANS_FLAG_ALLEXPLICIT;
+ break;
+ case OP_CHECK:
+ case 'k':
+ (config->op_q_check)++;
+ break;
+ default:
+ return 1;
}
return 0;
}
@@ -496,6 +506,13 @@ static void checkargs_database(void)
invalid_opt(config->flags & ALPM_TRANS_FLAG_ALLDEPS
&& config->flags & ALPM_TRANS_FLAG_ALLEXPLICIT,
"--asdeps", "--asexplicit");
+
+ if(config->op_q_check) {
+ invalid_opt(config->flags & ALPM_TRANS_FLAG_ALLDEPS,
+ "--asdeps", "--check");
+ invalid_opt(config->flags & ALPM_TRANS_FLAG_ALLEXPLICIT,
+ "--asexplicit", "--check");
+ }
}
static int parsearg_query(int opt)