Author: jkupec Date: Fri Nov 16 19:21:04 2007 New Revision: 7851 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7851&view=rev Log: - unused code removed - report 'too few arguments' for install/remove if none specified Modified: trunk/zypper/src/zypper.cc trunk/zypper/src/zypper.h Modified: trunk/zypper/src/zypper.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=7851&r1=7850&r2=7851&view=diff ============================================================================== --- trunk/zypper/src/zypper.cc (original) +++ trunk/zypper/src/zypper.cc Fri Nov 16 19:21:04 2007 @@ -1121,30 +1121,24 @@ else if (command == ZypperCommand::INSTALL || command == ZypperCommand::REMOVE) { - if (command == ZypperCommand::INSTALL) { - if (ghelp || arguments.size() < 1) { - cerr << specific_help; - return !ghelp; - } - - gData.packages_to_install = arguments; - - if (copts.count("auto-agree-with-licenses") - || copts.count("agree-to-third-party-licenses")) - gSettings.license_auto_agree = true; + if (ghelp) + { + cout << specific_help; + return ZYPPER_EXIT_OK; } - - - if (command == ZypperCommand::REMOVE) { - if (ghelp || arguments.size() < 1) { - cerr << specific_help; - return !ghelp; - } - - gData.packages_to_uninstall = arguments; + if (arguments.size() < 1) + { + cerr << _("Too few arguments."); + cerr << " " << _("At least one package name is required.") << endl << endl; + cerr << specific_help; + return ZYPPER_EXIT_ERR_INVALID_ARGS; } + if (copts.count("auto-agree-with-licenses") + || copts.count("agree-to-third-party-licenses")) + gSettings.license_auto_agree = true; + // check root user if (geteuid() != 0) { Modified: trunk/zypper/src/zypper.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.h?rev=7851&r1=7850&r2=7851&view=diff ============================================================================== --- trunk/zypper/src/zypper.h (original) +++ trunk/zypper/src/zypper.h Fri Nov 16 19:21:04 2007 @@ -61,8 +61,6 @@ std::listzypp::RepoInfo repos; int patches_count; int security_patches_count; - std::vectorstd::string packages_to_install; - std::vectorstd::string packages_to_uninstall; zypp::ResStore repo_resolvables; zypp::ResStore target_resolvables; zypp::RepoInfo current_repo; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org