Author: jkupec
Date: Sun Dec 9 18:20:42 2007
New Revision: 8083
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8083&view=rev
Log:
- support for --type added to the info command
Modified:
trunk/zypper/doc/zypper.8
trunk/zypper/src/zypper-info.cc
trunk/zypper/src/zypper-info.h
trunk/zypper/src/zypper.cc
Modified: trunk/zypper/doc/zypper.8
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/doc/zypper.8?rev=8083&r1=8082&r2=8083&view=diff
==============================================================================
--- trunk/zypper/doc/zypper.8 (original)
+++ trunk/zypper/doc/zypper.8 Sun Dec 9 18:20:42 2007
@@ -49,6 +49,13 @@
Displays full info for the specified packages.
.TP
+.I \-r, \-\-repo <alias>
+Work only with the repository specified by the alias.
+.TP
+.I \-t, \-\-type <type>
+Type of resolvable (default: package)
+
+.TP
.B install (in) [options] <name> ...
.TP
.B install (in) [options] --capability <capability> ...
Modified: trunk/zypper/src/zypper-info.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-info.cc?rev=8083&r1=8082&r2=8083&view=diff
==============================================================================
--- trunk/zypper/src/zypper-info.cc (original)
+++ trunk/zypper/src/zypper-info.cc Sun Dec 9 18:20:42 2007
@@ -23,14 +23,8 @@
/**
*
*/
-void printInfo(const Zypper & zypper)
+void printInfo(const Zypper & zypper, const Resolvable::Kind & kind)
{
- Resolvable::Kind kind;
- if (zypper.command() == ZypperCommand::INFO)
- kind = ResTraits<Package>::kind;
- else if (zypper.command() == ZypperCommand::RUG_PATCH_INFO)
- kind = ResTraits<Patch>::kind;
-
ResPool pool = God->pool();
cout << endl;
@@ -67,9 +61,9 @@
cout << endl << endl;
- if (zypper.command() == ZypperCommand::INFO)
+ if (kind == ResTraits<Package>::kind)
printPkgInfo(zypper, installer.item,installed);
- else if (zypper.command() == ZypperCommand::RUG_PATCH_INFO)
+ else if (kind == ResTraits<Patch>::kind)
printPatchInfo(zypper, installer.item,installed);
}
}
Modified: trunk/zypper/src/zypper-info.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-info.h?rev=8083&r1=8082&r2=8083&view=diff
==============================================================================
--- trunk/zypper/src/zypper-info.h (original)
+++ trunk/zypper/src/zypper-info.h Sun Dec 9 18:20:42 2007
@@ -2,10 +2,11 @@
#define ZYPPERINFO_H_
#include "zypp/PoolItem.h"
+#include "zypp/Resolvable.h"
#include "zypper.h"
-void printInfo(const Zypper & zypper);
+void printInfo(const Zypper & zypper, const zypp::Resolvable::Kind & kind);
void printPkgInfo(const Zypper & zypper,
const zypp::PoolItem & pool_item,
Modified: trunk/zypper/src/zypper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=8083&r1=8082&r2=8083&view=diff
==============================================================================
--- trunk/zypper/src/zypper.cc (original)
+++ trunk/zypper/src/zypper.cc Sun Dec 9 18:20:42 2007
@@ -881,16 +881,17 @@
{0, 0, 0, 0}
};
specific_options = update_options;
- _command_help = _(
- // TranslatorExplanation don't translate the resolvable types
- // (see the install command comment)
+ _command_help = boost::str(format(_(
+ // TranslatorExplanation the first %s = "package, patch, pattern, product"
+ // and the second %s = "patch"
"update (up) [options]\n"
"\n"
"Update all installed resolvables with newer versions, where applicable.\n"
"\n"
" Command options:\n"
"\n"
- "-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: patch)\n"
+ "-t, --type <type> Type of resolvable (%s)\n"
+ " Default: %s\n"
"-r, --repo <alias> Limit updates to the repository specified by the alias.\n"
" --skip-interactive Skip interactive updates\n"
"-l, --auto-agree-with-licenses Automatically say 'yes' to third party license confirmation prompt.\n"
@@ -898,7 +899,7 @@
" --best-effort Do a 'best effort' approach to update, updates to a lower than latest-and-greatest version are also acceptable\n"
" --debug-solver Create solver test case for debugging\n"
"-R, --force-resolution