Author: jkupec Date: Tue Sep 11 19:10:33 2007 New Revision: 7194 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7194&view=rev Log: - use name instead of alias everywhere except for the renamerepo command (#308669) Modified: trunk/zypper/src/zypper-misc.cc trunk/zypper/src/zypper-search.h trunk/zypper/src/zypper-source-callbacks.h trunk/zypper/src/zypper-sources.cc trunk/zypper/src/zypper.cc Modified: trunk/zypper/src/zypper-misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=7194&r1=7193&r2=7194&view=diff ============================================================================== --- trunk/zypper/src/zypper-misc.cc (original) +++ trunk/zypper/src/zypper-misc.cc Tue Sep 11 19:10:33 2007 @@ -567,7 +567,7 @@ cout_v << "-" << res->edition() << "." << res->arch(); // plus repo providing this package if (res->repository() != Repository::noRepository) - cout_v << " (" << res->repository().info().alias() << ")"; + cout_v << " (" << res->repository().info().name() << ")"; // new line after each package in the verbose mode cout_v << endl; } @@ -923,7 +923,7 @@ Patch::constPtr patch = asKind<Patch>(res); TableRow tr; - tr << patch->repository().info().alias (); + tr << patch->repository().info().name(); tr << res->name () << res->edition ().asString(); tr << patch->category(); tr << string_status (it->status ()); @@ -1043,7 +1043,7 @@ if (true) { TableRow tr (cols); - tr << patch->repository().info().alias (); + tr << patch->repository().info().name(); tr << res->name () << res->edition ().asString(); tr << patch->category(); tr << string_status (it->status ()); @@ -1199,7 +1199,7 @@ TableRow tr (cols); tr << "v"; if (!hide_repo) { - tr << res->repository().info().alias(); + tr << res->repository().info().name(); } if (gSettings.is_rug_compatible) tr << ""; // Bundle Modified: trunk/zypper/src/zypper-search.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-search.h?rev=7194&r1=7193&r2=7194&view=diff ============================================================================== --- trunk/zypper/src/zypper-search.h (original) +++ trunk/zypper/src/zypper-search.h Tue Sep 11 19:10:33 2007 @@ -314,7 +314,7 @@ { // add other fields to the result table row << "i" - << pool_item.resolvable()->repository().info().alias() + << pool_item.resolvable()->repository().info().name() // TODO what about rug's Bundle? << (gSettings.is_rug_compatible ? "" : pool_item.resolvable()->kind().asString()) << pool_item.resolvable()->name() Modified: trunk/zypper/src/zypper-source-callbacks.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-source-callbacks.h?rev=7194&r1=7193&r2=7194&view=diff ============================================================================== --- trunk/zypper/src/zypper-source-callbacks.h (original) +++ trunk/zypper/src/zypper-source-callbacks.h Tue Sep 11 19:10:33 2007 @@ -260,7 +260,7 @@ void display_step( int value ) { - display_progress ( "repo", cout, "(" + _repo.info().alias() + ") " + _task , value); + display_progress ( "repo", cout, "(" + _repo.info().name() + ") " + _task , value); } virtual bool progress( int value ) Modified: trunk/zypper/src/zypper-sources.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-sources.cc?rev=7194&r1=7193&r2=7194&view=diff ============================================================================== --- trunk/zypper/src/zypper-sources.cc (original) +++ trunk/zypper/src/zypper-sources.cc Tue Sep 11 19:10:33 2007 @@ -49,7 +49,7 @@ // check whether libzypp indicates a refresh is needed, and if so, // print a message cout_v << format( - _("Checking whether to refresh metadata for %s")) % repo.alias() + _("Checking whether to refresh metadata for %s")) % repo.name() << endl; for(RepoInfo::urls_const_iterator it = repo.baseUrlsBegin(); it != repo.baseUrlsEnd(); ++it) @@ -58,14 +58,14 @@ { if (manager.checkIfToRefreshMetadata(repo, *it)) { - cout_n << format(_("Refreshing '%s'")) % repo.alias(); + cout_n << format(_("Refreshing '%s'")) % repo.name(); if (command == ZypperCommand::REFRESH && copts.count("force")) cout_n << " " << _("(forced)"); cout_n << endl; } else if (command == ZypperCommand::REFRESH) { - cout_n << format(_("Repository '%s' is up to date.")) % repo.alias() << endl; + cout_n << format(_("Repository '%s' is up to date.")) % repo.name() << endl; } break; // don't check all the urls, just the first succussfull. } @@ -85,7 +85,7 @@ catch (const MediaException & e) { report_problem(e, - boost::str(format(_("Problem downloading files from '%s'.")) % repo.alias()), + boost::str(format(_("Problem downloading files from '%s'.")) % repo.name()), _("Please, see the above error message to for a hint.")); return true; // error @@ -93,12 +93,12 @@ catch (const RepoNoUrlException & e) { ZYPP_CAUGHT(e); - cerr << format(_("No URLs defined for '%s'.")) % repo.alias() << endl; + cerr << format(_("No URLs defined for '%s'.")) % repo.name() << endl; if (!repo.filepath().empty()) cerr << format( // TranslatorExplanation the first %s is a .repo file path _("Please, add one or more base URL (baseurl=URL) entries to %s for repository '%s'.")) - % repo.filepath() % repo.alias() << endl; + % repo.filepath() % repo.name() << endl; return true; // error } @@ -114,7 +114,7 @@ { ZYPP_CAUGHT(e); report_problem(e, - boost::str(format(_("Repository '%s' is invalid.")) % repo.alias()), + boost::str(format(_("Repository '%s' is invalid.")) % repo.name()), _("Please, check if the URLs defined for this repository are pointing to a valid repository.")); return true; // error @@ -123,9 +123,9 @@ { ZYPP_CAUGHT(e); report_problem(e, - boost::str(format(_("Error downloading metadata for '%s':")) % repo.alias())); + boost::str(format(_("Error downloading metadata for '%s':")) % repo.name())); // log untranslated message - ERR << format("Error reading repository '%s':") % repo.alias() << endl; + ERR << format("Error reading repository '%s':") % repo.name() << endl; return true; // error } @@ -163,7 +163,7 @@ ZYPP_CAUGHT(e); report_problem(e, - boost::str(format(_("Error parsing metadata for '%s':")) % repo.alias()), + boost::str(format(_("Error parsing metadata for '%s':")) % repo.name()), // TranslatorExplanation Don't translate the URL unless it is translated, too _("This may be caused by invalid metadata in the repository," " or by a bug in the metadata parser. In the latter case," @@ -171,7 +171,7 @@ " instructions at http://en.opensuse.org/Zypper#Troubleshooting")); // log untranslated message - ERR << format("Error parsing metadata for '%s':") % repo.alias() << endl; + ERR << format("Error parsing metadata for '%s':") % repo.name() << endl; return true; // error } @@ -179,7 +179,7 @@ { ZYPP_CAUGHT(e); report_problem(e, - boost::str(format(_("Repository metadata for '%s' not found in local cache.")) % repo.alias())); + boost::str(format(_("Repository metadata for '%s' not found in local cache.")) % repo.name())); // this should not happend and is probably a bug, rethrowing ZYPP_RETHROW(e); } @@ -240,14 +240,14 @@ it != gData.repos.end(); ++it) { RepoInfo repo(*it); - MIL << "checking if to refresh " << repo.alias() << endl; + MIL << "checking if to refresh " << repo.name() << endl; //! \todo honor command line options/commands bool do_refresh = repo.enabled() && repo.autorefresh(); if (do_refresh) { - MIL << "calling refresh for " << repo.alias() << endl; + MIL << "calling refresh for " << repo.name() << endl; // handle root user differently if (geteuid() == 0) @@ -255,9 +255,9 @@ if (refresh_raw_metadata(repo, false) || build_cache(repo, false)) { cerr << format(_("Disabling repository '%s' because of the above error.")) - % repo.alias() << endl; + % repo.name() << endl; ERR << format("Disabling repository '%s' because of the above error.") - % repo.alias() << endl; + % repo.name() << endl; it->setEnabled(false); } @@ -273,11 +273,11 @@ { cout << format(_( "Repository '%s' is out-of-date. You can run 'zypper refresh'" - " as root to update it.")) % repo.alias() + " as root to update it.")) % repo.name() << endl; string nonroot = - "We're running as non-root, skipping refresh of " + repo.alias(); + "We're running as non-root, skipping refresh of " + repo.name(); MIL << nonroot << endl; cout_vv << nonroot << endl; } @@ -548,7 +548,7 @@ if (!repo.enabled()) { string msg = boost::str( - format(_("Skipping disabled repository '%s'")) % repo.alias()); + format(_("Skipping disabled repository '%s'")) % repo.name()); if (argc) cerr << msg << endl; @@ -585,9 +585,9 @@ if (error) { cerr << format(_("Skipping repository '%s' because of the above error.")) - % repo.alias() << endl; + % repo.name() << endl; ERR << format("Skipping repository '%s' because of the above error.") - % repo.alias() << endl; + % repo.name() << endl; error_count++; } } @@ -684,7 +684,7 @@ ZYPP_CAUGHT(e); cerr << format(_("Repository named '%s' already exists. Please, use another alias.")) % repo.alias() << endl; - ERR << "Repository named '%s' already exists." << endl; + ERR << "Repository named '" << repo.alias() << "' already exists." << endl; return ZYPPER_EXIT_ERR_ZYPP; } catch (const RepoUnknownTypeException & e) @@ -714,7 +714,7 @@ return ZYPPER_EXIT_ERR_BUG; } - cout << format(_("Repository '%s' successfully added")) % repo.alias(); + cout << format(_("Repository '%s' successfully added")) % repo.name(); cout_n << ":"; cout << endl; @@ -737,13 +737,13 @@ if(is_cd) { - cout_n << format(_("Reading data from '%s' media")) % repo.alias() << endl; + cout_n << format(_("Reading data from '%s' media")) % repo.name() << endl; bool error = refresh_raw_metadata(repo, false); if (!error) error = build_cache(repo, false); if (error) { - cerr << format(_("Problem reading data from '%s' media")) % repo.alias() << endl; + cerr << format(_("Problem reading data from '%s' media")) % repo.name() << endl; cerr << _("Please, check if your installation media is valid and readable.") << endl; return ZYPPER_EXIT_ERR_ZYPP; } @@ -867,8 +867,8 @@ try { manager.removeRepository(repoinfo); - cout << format(_("Repository %s has been removed.")) % repoinfo.alias() << endl; - MIL << format("Repository %s has been removed.") % repoinfo.alias() << endl; + cout << format(_("Repository %s has been removed.")) % repoinfo.name() << endl; + MIL << format("Repository %s has been removed.") % repoinfo.name() << endl; } catch (const repo::RepoNotFoundException & ex) { @@ -1045,22 +1045,22 @@ if ( manager.metadataStatus(repo).empty() ) { cout_v << format(_("Retrieving repository '%s' data...")) - % repo.alias() << endl; + % repo.name() << endl; error = refresh_raw_metadata(repo, false); } if (!error && !manager.isCached(repo)) { cout_v << format(_("Repository '%s' not cached. Caching...")) - % repo.alias() << endl; + % repo.name() << endl; error = build_cache(repo, false); } if (error) { - cerr << format(_("Problem loading data from '%s'")) % repo.alias() << endl; + cerr << format(_("Problem loading data from '%s'")) % repo.name() << endl; cerr << format(_("Resolvables from '%s' not loaded because of error.")) - % repo.alias() << endl; + % repo.name() << endl; continue; } @@ -1077,10 +1077,10 @@ { ZYPP_CAUGHT(e); report_problem(e, - boost::str(format(_("Problem loading data from '%s'")) % repo.alias()), + boost::str(format(_("Problem loading data from '%s'")) % repo.name()), _("Try 'zypper refresh', or even remove /var/cache/zypp/zypp.db before doing so.")); cerr << format(_("Resolvables from '%s' not loaded because of error.")) - % repo.alias() << endl; + % repo.name() << endl; } } } Modified: trunk/zypper/src/zypper.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=7194&r1=7193&r2=7194&view=diff ============================================================================== --- trunk/zypper/src/zypper.cc (original) +++ trunk/zypper/src/zypper.cc Tue Sep 11 19:10:33 2007 @@ -1624,7 +1624,7 @@ } } say_goodbye __attribute__ ((__unused__)); - // set locale + // set locale setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org