diff options
author | Daniel Burrows <dburrows@debian.org> | 2008-03-11 08:10:27 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2008-03-11 08:10:27 -0700 |
commit | 0be872739dfb5abae1d90b9b184669e48b193f0a (patch) | |
tree | 7c322c9a5f6b54705b424f0c4aab167a12704856 /src/main.cc | |
parent | 25477dd94ccbde891458e848d4f106f006009693 (diff) | |
download | aptitude-0be872739dfb5abae1d90b9b184669e48b193f0a.tar.gz |
Add support for installing build-dependencies at the command-line. (Closes: #243317)
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main.cc b/src/main.cc index 2fa49f5a..25dd34f1 100644 --- a/src/main.cc +++ b/src/main.cc @@ -193,7 +193,9 @@ enum { OPTION_REMOVE_USER_TAG, OPTION_REMOVE_USER_TAG_FROM, OPTION_SAFE_RESOLVER, - OPTION_FULL_RESOLVER + OPTION_FULL_RESOLVER, + OPTION_ARCH_ONLY, + OPTION_NOT_ARCH_ONLY }; int getopt_result; @@ -228,6 +230,8 @@ option opts[]={ {"add-user-tag-to", 1, &getopt_result, OPTION_ADD_USER_TAG_TO}, {"remove-user-tag", 1, &getopt_result, OPTION_REMOVE_USER_TAG}, {"remove-user-tag-from", 1, &getopt_result, OPTION_REMOVE_USER_TAG_FROM}, + {"arch-only", 0, &getopt_result, OPTION_ARCH_ONLY}, + {"not-arch-only", 0, &getopt_result, OPTION_NOT_ARCH_ONLY}, {0,0,0,0} }; @@ -256,6 +260,7 @@ int main(int argc, char *argv[]) bool simulate = aptcfg->FindB(PACKAGE "::CmdLine::Simulate", false) || aptcfg->FindB(PACKAGE "::Simulate", false); bool download_only=aptcfg->FindB(PACKAGE "::CmdLine::Download-Only", false);; + bool arch_only = aptcfg->FindB("Apt::Get::Arch-Only", false); bool update_only=false, install_only=false, queue_only=false; bool assume_yes=aptcfg->FindB(PACKAGE "::CmdLine::Assume-Yes", false); @@ -492,6 +497,12 @@ int main(int argc, char *argv[]) user_tags.push_back(tag_application(is_add, optarg, m)); } } + case OPTION_NOT_ARCH_ONLY: + arch_only = false; + break; + case OPTION_ARCH_ONLY: + arch_only = true; + break; default: fprintf(stderr, "%s", _("WEIRDNESS: unknown option code received\n")); @@ -589,7 +600,9 @@ int main(int argc, char *argv[]) (!strcasecmp(argv[optind], "unmarkauto")) || (!strcasecmp(argv[optind], "forbid-version")) || (!strcasecmp(argv[optind], "keep")) || - (!strcasecmp(argv[optind], "keep-all")) ) + (!strcasecmp(argv[optind], "keep-all")) || + (!strcasecmp(argv[optind], "build-dep")) || + (!strcasecmp(argv[optind], "build-depends"))) { return cmdline_do_action(argc-optind, argv+optind, status_fname, @@ -599,7 +612,7 @@ int main(int argc, char *argv[]) always_use_safe_resolver, safe_resolver_no_new_installs, safe_resolver_no_new_upgrades, user_tags, - queue_only, verbose); + arch_only, queue_only, verbose); } else if(!strcasecmp(argv[optind], "safe-upgrade") || !strcasecmp(argv[optind], "upgrade")) @@ -618,7 +631,7 @@ int main(int argc, char *argv[]) showvers, showdeps, showsize, user_tags, visual_preview, always_prompt, - queue_only, verbose); + arch_only, queue_only, verbose); } else if(!strcasecmp(argv[optind], "add-user-tag") || !strcasecmp(argv[optind], "remove-user-tag")) |