summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-12-02 14:04:18 -0600
committerDan McGee <dan@archlinux.org>2008-03-08 14:13:34 -0600
commit3ec45486ff1373f9f65af229af315219fc1f0f7e (patch)
treee3ca516069cd9e3b807f4e26938a046df8a40b5b
parent266f06866bd56b86ca8525d2e07d48d08fedaa8f (diff)
downloadpacman-3ec45486ff1373f9f65af229af315219fc1f0f7e.tar.xz
Remove the Add option from the command line
There is still a lot of code that could be cleaned up internally. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--doc/pacman.8.txt7
-rw-r--r--src/pacman/conf.h1
-rw-r--r--src/pacman/pacman.c17
3 files changed, 2 insertions, 23 deletions
diff --git a/doc/pacman.8.txt b/doc/pacman.8.txt
index 8a3f675d..82358750 100644
--- a/doc/pacman.8.txt
+++ b/doc/pacman.8.txt
@@ -28,13 +28,6 @@ ends to be written (for instance, a GUI front end).
Operations
----------
-*-A, \--add* (deprecated)::
- Add a package to the system. Either a URL or file path can be specified.
- The package will be uncompressed into the installation root and the
- database will be updated. The package will not be installed if another
- version is already installed. *NOTE*: please use '\--upgrade' in place of
- this option.
-
*-Q, \--query*::
Query the package database. This operation allows you to view installed
packages and their files, as well as meta-information about individual
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index f804f560..beabf469 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -75,7 +75,6 @@ typedef struct __config_t {
/* Operations */
enum {
PM_OP_MAIN = 1,
- PM_OP_ADD,
PM_OP_REMOVE,
PM_OP_UPGRADE,
PM_OP_QUERY,
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 331cbe91..32fbaced 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -68,21 +68,13 @@ static void usage(int op, const char * const myname)
printf("%s:\n", str_opt);
printf(" %s {-h --help}\n", myname);
printf(" %s {-V --version}\n", myname);
- printf(" %s {-A --add} [%s] <%s>\n", myname, str_opt, str_file);
printf(" %s {-Q --query} [%s] [%s]\n", myname, str_opt, str_pkg);
printf(" %s {-R --remove} [%s] <%s>\n", myname, str_opt, str_pkg);
printf(" %s {-S --sync} [%s] [%s]\n", myname, str_opt, str_pkg);
printf(" %s {-U --upgrade} [%s] <%s>\n", myname, str_opt, str_file);
printf(_("\nuse '%s --help' with other options for more syntax\n"), myname);
} else {
- if(op == PM_OP_ADD) {
- printf("%s: %s {-A --add} [%s] <%s>\n", str_usg, myname, str_opt, str_file);
- printf("%s:\n", str_opt);
- printf(_(" --asdeps install packages as non-explicitly installed\n"));
- printf(_(" --asexplicit install packages as explicitly installed\n"));
- printf(_(" -d, --nodeps skip dependency checks\n"));
- printf(_(" -f, --force force install, overwrite conflicting files\n"));
- } else if(op == PM_OP_REMOVE) {
+ if(op == PM_OP_REMOVE) {
printf("%s: %s {-R --remove} [%s] <%s>\n", str_usg, myname, str_opt, str_pkg);
printf("%s:\n", str_opt);
printf(_(" -c, --cascade remove packages and all packages that depend on them\n"));
@@ -302,7 +294,6 @@ static int parseargs(int argc, char *argv[])
int option_index = 0;
static struct option opts[] =
{
- {"add", no_argument, 0, 'A'},
{"query", no_argument, 0, 'Q'},
{"remove", no_argument, 0, 'R'},
{"sync", no_argument, 0, 'S'},
@@ -354,7 +345,7 @@ static int parseargs(int argc, char *argv[])
{0, 0, 0, 0}
};
- while((opt = getopt_long(argc, argv, "ARUFQSTr:b:vkhscVfmnoldepqituwygz", opts, &option_index))) {
+ while((opt = getopt_long(argc, argv, "RUFQSTr:b:vkhscVfmnoldepqituwygz", opts, &option_index))) {
alpm_list_t *list = NULL, *item = NULL; /* lists for splitting strings */
if(opt < 0) {
@@ -425,7 +416,6 @@ static int parseargs(int argc, char *argv[])
case 1012:
config->flags |= PM_TRANS_FLAG_ALLEXPLICIT;
break;
- case 'A': config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_ADD); break;
case 'Q': config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_QUERY); break;
case 'R': config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_REMOVE); break;
case 'S': config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_SYNC); break;
@@ -855,9 +845,6 @@ int main(int argc, char *argv[])
/* start the requested operation */
switch(config->op) {
- case PM_OP_ADD:
- ret = pacman_add(pm_targets);
- break;
case PM_OP_REMOVE:
ret = pacman_remove(pm_targets);
break;