-------------------------------------------------------------------
+Wed Jul 25 17:05:00 CEST 2007 - kkaempf@suse.de
+
+- implement '--best-effort' for "list updates"
+ adapt output columns appropriately (in best-effort mode, zypper
+ does not know the repository, version, or architecture since the
+ dependency solver will determine it later.)
+- make "list update" output handling more robust
+- r6216
+
+-------------------------------------------------------------------
Wed Jul 25 16:20:38 CEST 2007 - kkaempf@suse.de
- add "--from-repo" option to "list updates" and "update" to limit
updates to a specific repository.
- improve help of (-t <resolvable type>) by explicitly listing
possible types.
-- r6212
+- r6213
-------------------------------------------------------------------
Thu Jul 25 15:57:00 CEST 2007 - tgoettlicher@suse.de
list_patch_updates( repo_alias, best_effort );
else {
Table tbl;
-
+
+ // show repo only if not best effort or --from-repo set
+ // on best_effort, the solver will determine the repo if we don't limit it to a specific one
+ bool hide_repo = best_effort && repo_alias.empty();
+
// header
TableHeader th;
- unsigned cols = 5;
+ unsigned int name_col;
// TranslatorExplanation S stands for Status
th << _("S");
- th << (gSettings.is_rug_compatible ? _("Catalog: ") : _("Repository: "));
+ if (!hide_repo) {
+ th << (gSettings.is_rug_compatible ? _("Catalog: ") : _("Repository: "));
+ }
if (gSettings.is_rug_compatible) {
th << _("Bundle");
- ++cols;
}
- th << _("Name") << _("Version") << _("Arch");
+ name_col = th.cols();
+ th << _("Name");
+ if (!best_effort) { // best_effort does not know version or arch yet
+ th << _("Version") << _("Arch");
+ }
tbl << th;
+ unsigned int cols = th.cols();
+
Candidates candidates;
find_updates( kind, repo_alias, candidates ); // best_effort could be passed here ...
// candstat.setToBeInstalled (ResStatus::USER);
ResObject::constPtr res = ci->resolvable();
TableRow tr (cols);
- tr << "v" << res->repository().info().alias();
+ tr << "v";
+ if (!hide_repo) {
+ tr << res->repository().info().alias();
+ }
if (gSettings.is_rug_compatible)
tr << ""; // Bundle
- tr << res->name ()
- << res->edition ().asString ()
- << res->arch ().asString ();
+ tr << res->name ();
+
+ // strictly speaking, we could show version and arch even in best_effort
+ // iff there is only one candidate. But we don't know the number of candidates here.
+ if (!best_effort) {
+ tr << res->edition ().asString ()
+ << res->arch ().asString ();
+ }
tbl << tr;
}
- tbl.sort (gSettings.is_rug_compatible? 3: 2); // Name
+ tbl.sort( name_col );
if (tbl.empty())
cout_n << _("No updates found.") << endl;
string srepo = copts.count( "from-repo" ) ? copts["from-repo"].front() : "";
bool best_effort = copts.count( "best-effort" );
+ if (gSettings.is_rug_compatible && best_effort) {
+ best_effort = false;
+ // 'rug' is the name of a program and must not be translated
+ // 'best-effort' is a program parameter and can not be translated
+ cerr << _("Running as 'rug', can't do 'best-effort' approach to update.") << endl;
+ }
cond_init_target ();
init_repos ();
cond_load_resolvables();
string srepo = copts.count( "from-repo" ) ? copts["from-repo"].front() : "";
bool best_effort = copts.count( "best-effort" );
+ if (gSettings.is_rug_compatible && best_effort) {
+ best_effort = false;
+ // 'rug' is the name of a program and must not be translated
+ // 'best-effort' is a program parameter and can not be translated
+ cerr << _("Running as 'rug', can't do 'best-effort' approach to update.") << endl;
+ }
cond_init_target ();
init_repos ();
cond_load_resolvables ();