Author: jkupec
Date: Sun Sep 28 22:06:54 2008
New Revision: 11191
URL: http://svn.opensuse.org/viewcvs/zypp?rev=11191&view=rev
Log:
- 'update' and 'list-updates' now defaults to '-t package'
patch/list-patches commands added to install/list patches
(bnc #395480)
Modified:
trunk/zypper/src/Command.cc
trunk/zypper/src/Command.h
trunk/zypper/src/Zypper.cc
trunk/zypper/src/update.cc
Modified: trunk/zypper/src/Command.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/Command.cc?rev=11191&r1=11190&r2=11191&view=diff
==============================================================================
--- trunk/zypper/src/Command.cc (original)
+++ trunk/zypper/src/Command.cc Sun Sep 28 22:06:54 2008
@@ -38,16 +38,19 @@
const ZypperCommand ZypperCommand::INSTALL(ZypperCommand::INSTALL_e);
const ZypperCommand ZypperCommand::REMOVE(ZypperCommand::REMOVE_e);
-const ZypperCommand ZypperCommand::UPDATE(ZypperCommand::UPDATE_e);
-const ZypperCommand ZypperCommand::DIST_UPGRADE(ZypperCommand::DIST_UPGRADE_e);
const ZypperCommand ZypperCommand::SRC_INSTALL(ZypperCommand::SRC_INSTALL_e);
const ZypperCommand ZypperCommand::VERIFY(ZypperCommand::VERIFY_e);
const ZypperCommand ZypperCommand::INSTALL_NEW_RECOMMENDS(ZypperCommand::INSTALL_NEW_RECOMMENDS_e);
-const ZypperCommand ZypperCommand::SEARCH(ZypperCommand::SEARCH_e);
-const ZypperCommand ZypperCommand::INFO(ZypperCommand::INFO_e);
+const ZypperCommand ZypperCommand::UPDATE(ZypperCommand::UPDATE_e);
const ZypperCommand ZypperCommand::LIST_UPDATES(ZypperCommand::LIST_UPDATES_e);
+const ZypperCommand ZypperCommand::PATCH(ZypperCommand::PATCH_e);
+const ZypperCommand ZypperCommand::LIST_PATCHES(ZypperCommand::LIST_PATCHES_e);
const ZypperCommand ZypperCommand::PATCH_CHECK(ZypperCommand::PATCH_CHECK_e);
+const ZypperCommand ZypperCommand::DIST_UPGRADE(ZypperCommand::DIST_UPGRADE_e);
+
+const ZypperCommand ZypperCommand::SEARCH(ZypperCommand::SEARCH_e);
+const ZypperCommand ZypperCommand::INFO(ZypperCommand::INFO_e);
const ZypperCommand ZypperCommand::PACKAGES(ZypperCommand::PACKAGES_e);
const ZypperCommand ZypperCommand::PATCHES(ZypperCommand::PATCHES_e);
const ZypperCommand ZypperCommand::PATTERNS(ZypperCommand::PATTERNS_e);
@@ -110,16 +113,19 @@
_table["install"] = _table["in"] = ZypperCommand::INSTALL_e;
_table["remove"] = _table["rm"] = ZypperCommand::REMOVE_e;
- _table["update"] = _table["up"] = ZypperCommand::UPDATE_e;
- _table["dist-upgrade"] = _table["dup"] = ZypperCommand::DIST_UPGRADE_e;
_table["source-install"] = _table["si"] = ZypperCommand::SRC_INSTALL_e;
_table["verify"] = _table["ve"] = ZypperCommand::VERIFY_e;
_table["install-new-recommends"] = _table["inr"] = ZypperCommand::INSTALL_NEW_RECOMMENDS_e;
- _table["search"] = _table["se"] = ZypperCommand::SEARCH_e;
- _table["info"] = _table["if"] = ZypperCommand::INFO_e;
+ _table["update"] = _table["up"] = ZypperCommand::UPDATE_e;
_table["list-updates"] = _table["lu"] = ZypperCommand::LIST_UPDATES_e;
+ _table["patch"] = ZypperCommand::PATCH_e;
+ _table["list-patches"] = _table["lp"] = ZypperCommand::LIST_PATCHES_e;
_table["patch-check"] = _table["pchk"] = ZypperCommand::PATCH_CHECK_e;
+ _table["dist-upgrade"] = _table["dup"] = ZypperCommand::DIST_UPGRADE_e;
+
+ _table["search"] = _table["se"] = ZypperCommand::SEARCH_e;
+ _table["info"] = _table["if"] = ZypperCommand::INFO_e;
_table["packages"] = _table["pa"] = _table["pkg"] = ZypperCommand::PACKAGES_e;
_table["patches"] = _table["pch"] = ZypperCommand::PATCHES_e;
_table["patterns"] = _table["pt"] = ZypperCommand::PATTERNS_e;
Modified: trunk/zypper/src/Command.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/Command.h?rev=11191&r1=11190&r2=11191&view=diff
==============================================================================
--- trunk/zypper/src/Command.h (original)
+++ trunk/zypper/src/Command.h Sun Sep 28 22:06:54 2008
@@ -33,16 +33,19 @@
static const ZypperCommand INSTALL;
static const ZypperCommand REMOVE;
- static const ZypperCommand UPDATE;
- static const ZypperCommand DIST_UPGRADE;
static const ZypperCommand SRC_INSTALL;
static const ZypperCommand VERIFY;
static const ZypperCommand INSTALL_NEW_RECOMMENDS;
+
+ static const ZypperCommand UPDATE;
+ static const ZypperCommand LIST_UPDATES;
+ static const ZypperCommand PATCH;
+ static const ZypperCommand LIST_PATCHES;
+ static const ZypperCommand PATCH_CHECK;
+ static const ZypperCommand DIST_UPGRADE;
static const ZypperCommand SEARCH;
static const ZypperCommand INFO;
- static const ZypperCommand LIST_UPDATES;
- static const ZypperCommand PATCH_CHECK;
static const ZypperCommand PACKAGES;
static const ZypperCommand PATCHES;
static const ZypperCommand PATTERNS;
@@ -102,16 +105,19 @@
INSTALL_e,
REMOVE_e,
- UPDATE_e,
- DIST_UPGRADE_e,
SRC_INSTALL_e,
VERIFY_e,
INSTALL_NEW_RECOMMENDS_e,
- SEARCH_e,
- INFO_e,
+ UPDATE_e,
LIST_UPDATES_e,
+ PATCH_e,
+ LIST_PATCHES_e,
PATCH_CHECK_e,
+ DIST_UPGRADE_e,
+
+ SEARCH_e,
+ INFO_e,
PACKAGES_e,
PATCHES_e,
PATTERNS_e,
Modified: trunk/zypper/src/Zypper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/Zypper.cc?rev=11191&r1=11190&r2=11191&view=diff
==============================================================================
--- trunk/zypper/src/Zypper.cc (original)
+++ trunk/zypper/src/Zypper.cc Sun Sep 28 22:06:54 2008
@@ -207,20 +207,25 @@
"\tinstall, in\t\tInstall packages.\n"
"\tremove, rm\t\tRemove packages.\n"
"\tverify, ve\t\tVerify integrity of package dependencies.\n"
- "\tupdate, up\t\tUpdate installed packages with newer versions.\n"
- "\tdist-upgrade, dup\tPerform a distribution upgrade.\n"
"\tsource-install, si\tInstall source packages and their build dependencies.\n"
"\tinstall-new-recommends, inr Install newly added packages recommended by installed packages.\n"
);
+ static string help_update_commands = _("\tUpdate Management:\n"
+ "\tupdate, up\t\tUpdate installed packages with newer versions.\n"
+ "\tlist-updates, lu\tList available updates.\n"
+ "\tpatch\t\t\tInstall needed patches.\n"
+ "\tlist-updates, lu\tList needed patches.\n"
+ "\tdist-upgrade, dup\tPerform a distribution upgrade.\n"
+ "\tpatch-check, pchk\tCheck for patches.\n"
+ );
+
static string help_query_commands = _("\tQuerying:\n"
"\tsearch, se\t\tSearch for packages matching a pattern.\n"
"\tinfo, if\t\tShow full information for specified packages.\n"
"\tpatch-info\t\tShow full information for specified patches.\n"
"\tpattern-info\t\tShow full information for specified patterns.\n"
"\tproduct-info\t\tShow full information for specified products.\n"
- "\tpatch-check, pchk\tCheck for patches.\n"
- "\tlist-updates, lu\tList available updates.\n"
"\tpatches, pch\t\tList all available patches.\n"
"\tpackages, pa\t\tList all available packages.\n"
"\tpatterns, pt\t\tList all available patterns.\n"
@@ -255,6 +260,7 @@
zypper.out().info(help_repo_commands, Out::QUIET);
zypper.out().info(help_service_commands, Out::QUIET);
zypper.out().info(help_package_commands, Out::QUIET);
+ zypper.out().info(help_update_commands, Out::QUIET);
zypper.out().info(help_query_commands, Out::QUIET);
zypper.out().info(help_lock_commands, Out::QUIET);
zypper.out().info(help_other_commands, Out::QUIET);
@@ -693,6 +699,7 @@
case ZypperCommand::INSTALL_e:
case ZypperCommand::REMOVE_e:
case ZypperCommand::UPDATE_e:
+ case ZypperCommand::PATCH_e:
{
remove_selections(*this);
break;
@@ -1442,9 +1449,9 @@
_command_help = str::form(_(
// TranslatorExplanation the first %s = "package, patch, pattern, product"
// and the second %s = "patch"
- "update (up) [options]\n"
+ "update (up) [options] ...\n"
"\n"
- "Update all installed resolvables with newer versions, where applicable.\n"
+ "Update all or specified installed packages with newer versions, if possible.\n"
"\n"
" Command options:\n"
"\n"
@@ -1452,7 +1459,8 @@
" Default: %s.\n"
"-r, --repo