Author: jkupec Date: Mon Jun 18 15:53:41 2007 New Revision: 5769 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5769&view=rev Log: backup Modified: trunk/zypper/doc/zypper-rug trunk/zypper/src/zypper-misc.cc trunk/zypper/src/zypper-search.cc trunk/zypper/src/zypper-sources.cc trunk/zypper/src/zypper.cc trunk/zypper/src/zypper.h Modified: trunk/zypper/doc/zypper-rug URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/doc/zypper-rug?rev=5769&r1=5768&r2=5769&view=diff ============================================================================== --- trunk/zypper/doc/zypper-rug (original) +++ trunk/zypper/doc/zypper-rug Mon Jun 18 15:53:41 2007 @@ -16,93 +16,96 @@ --no-abbrev No abbreviation --debug Debug output, print full exception traces --quiet Quiet output, print only error messages - - Bundle management: -N1 bundle-history (bhi) Search bundle log entries -N1 bundle-install (bin) Install bundles -N1 bundle-list (bl) List the available bundles -N1 bundle-lock-add (bla) Add a bundle lock rule -N1 bundle-lock-delete (bld) Delete a bundle lock -N1 bundle-lock-list (bll) List bundle locks -N1 bundle-remove (brm) Remove bundles -N1 bundle-search (bse) Search for bundles -N1 bundle-upgrade (bup) Upgrade bundles -? catalogs (ca) List the available catalogs -? subscribe (sub) Subscribe to catalogs -? unsubscribe (unsub) Unsubscribe to catalogs - - Other: - Unknown! - - Package management: -N1 bundle-packages (bp) Show the packages in a given bundle -N1 checkpoint-add (cpa) Add a check point -N1 checkpoint-remove (cpr) Remove a check point -N1 checkpoints (cp) Get a list of saved check points -N1 dump Get an dump of system information as a sqlite database -+ file-list (fl) List files within a package -N1 history (hi) Search log entries -++ info (if) Show the full info for packages -+ info-conflicts (ic) List all conflicts for package -+ info-obsoletes (io) List all obsoletes for package -+ info-provides (ip) List package's provides -+ info-requirements (ir) List package's requirements -++ install (in) Install packages -++ list-updates (lu) Show the available updates. -+ package-file (pf) Get package which contains file -+ packages (pa) Show the packages in a given catalog -+ patch-search (pse) Search for patches matching a pattern -++ remove (rm) Remove packages -N1 rollback (ro) Rollback packages to a specified date -++ search (se) Search for packages matching a pattern -+1 summary (sum) Show a per-catalog summary of available updates. -++ update (up) Update packages -? verify (ve) Verify system dependencies -+ what-conflicts (wc) List packages that conflict with a given token -+ what-provides (wp) Show which packages provide a given token -+ what-requires (wr) Show which packages require a given token - - Patch management: -++ patches (pch) Show the patches in a given catalog -++ patch-info Show detailed information for a patch - - Pattern management: -+ pattern-info Show detailed information for a pattern -+ patterns (pt) Show the patterns in a given catalog - - Preference management: -? get-prefs (get prefs) List the system preferences that may be set -? set-prefs (set) Set a preference variable - - Product management: -+ product-info Show detailed information for a product -+ products (pd) Show the products in a given catalog - - Security: -N1 key-add (ka) Add to the list of whitelisted keys for a service -N1 key-delete (kd) Remove from the list of whitelisted keys for a service -N1 key-list (kl) Display whitelisted keys for a service - - Service management: -? mount Mount directory as a channel -++ refresh (ref) Refresh all or some services -? register (reg) Register a service -++ service-add (sa) Add a service -++ service-delete (sd) Delete a service -++ service-list (sl) List the available services -? service-types (st) List the available service types - - System: -? clean-cache (cc) Clean the HTTP cache -N1 load-modules (lm) Load ZMD modules -N1 ping Ping the deamon -N1 restart Restart the daemon -N1 schedules (sch) Show scheduled items -N1 shutdown Shut down the daemon -N1 sleep Put the daemon to sleep - - User management: -N1 user-add (ua) Add a new user -N1 user-delete (ud) Delete users -N1 user-edit (ue) Edit an existing user -N1 user-list (ul) List users + +------------------+----+----------------------------+---------------------------- + zypper command | St | rug command | rug description +------------------+----+----------------------------+---------------------------- + Bundle management: + N1 bundle-history (bhi) Search bundle log entries + N1 bundle-install (bin) Install bundles + N1 bundle-list (bl) List the available bundles + N1 bundle-lock-add (bla) Add a bundle lock rule + N1 bundle-lock-delete (bld) Delete a bundle lock + N1 bundle-lock-list (bll) List bundle locks + N1 bundle-remove (brm) Remove bundles + N1 bundle-search (bse) Search for bundles + N1 bundle-upgrade (bup) Upgrade bundles + ? catalogs (ca) List the available catalogs + ? subscribe (sub) Subscribe to catalogs + ? unsubscribe (unsub) Unsubscribe to catalogs + + Other: + Unknown! + + Package management: + N1 bundle-packages (bp) Show the packages in a given bundle + N1 checkpoint-add (cpa) Add a check point + N1 checkpoint-remove (cpr) Remove a check point + N1 checkpoints (cp) Get a list of saved check points + N1 dump Get an dump of system information as a sqlite database + + file-list (fl) List files within a package + N1 history (hi) Search log entries + info ++ info (if) Show the full info for packages + + info-conflicts (ic) List all conflicts for package + + info-obsoletes (io) List all obsoletes for package + + info-provides (ip) List package's provides + + info-requirements (ir) List package's requirements + install ++ install (in) Install packages + ++ list-updates (lu) Show the available updates. + + package-file (pf) Get package which contains file + + packages (pa) Show the packages in a given catalog + + patch-search (pse) Search for patches matching a pattern + remove ++ remove (rm) Remove packages + N1 rollback (ro) Rollback packages to a specified date + search ++ search (se) Search for packages matching a pattern + update +1 summary (sum) Show a per-catalog summary of available updates. + ++ update (up) Update packages + ? verify (ve) Verify system dependencies + + what-conflicts (wc) List packages that conflict with a given token + + what-provides (wp) Show which packages provide a given token + + what-requires (wr) Show which packages require a given token + + Patch management: + search -t patch ++ patches (pch) Show the patches in a given catalog + info -t patch ++ patch-info Show detailed information for a patch + + Pattern management: + info -t pattern + pattern-info Show detailed information for a pattern + search -t pattern + patterns (pt) Show the patterns in a given catalog + + Preference management: + ? get-prefs (get prefs) List the system preferences that may be set + ? set-prefs (set) Set a preference variable + + Product management: + info -t product + product-info Show detailed information for a product + search -t product + products (pd) Show the products in a given catalog + + Security: + N1 key-add (ka) Add to the list of whitelisted keys for a service + N1 key-delete (kd) Remove from the list of whitelisted keys for a service + N1 key-list (kl) Display whitelisted keys for a service + + Service management: + ? mount Mount directory as a channel + refresh ++ refresh (ref) Refresh all or some services + ? register (reg) Register a service + addrepo ++ service-add (sa) Add a service + rmrepo ++ service-delete (sd) Delete a service + listrepos ++ service-list (sl) List the available services + ? service-types (st) List the available service types + + System: + ? clean-cache (cc) Clean the HTTP cache + N1 load-modules (lm) Load ZMD modules + N1 ping Ping the deamon + N1 restart Restart the daemon + N1 schedules (sch) Show scheduled items + N1 shutdown Shut down the daemon + N1 sleep Put the daemon to sleep + + User management: + N1 user-add (ua) Add a new user + N1 user-delete (ud) Delete users + N1 user-edit (ue) Edit an existing user + N1 user-list (ul) List users Modified: trunk/zypper/src/zypper-misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=5769&r1=5768&r2=5769&view=diff ============================================================================== --- trunk/zypper/src/zypper-misc.cc (original) +++ trunk/zypper/src/zypper-misc.cc Mon Jun 18 15:53:41 2007 @@ -448,24 +448,31 @@ Repository repository; - try { + try + { + if (!manager.isCached(repo)) + { + cout_v << format(_("Repository '%s' not cached. Caching...")) + % repo.alias() << endl; + manager.buildCache(repo); + } + repository = manager.createFromCache(repo); + ResStore store = repository.resolvables(); + God->addResolvables(store); + + cout_vv << format(_("(%d resolvables found)")) % store.size() << endl; } catch ( const repo::RepoNotCachedException &e ) { - ZYPP_CAUGHT(e); - cout_v << "Repository " << repo.alias() << " not cached. Caching..." << endl; - manager.buildCache(repo); - repository = manager.createFromCache(repo); + ZYPP_CAUGHT(e); + cerr << format(_("Problem loading data from '%s'")) % repo.alias(); + cerr_v << ":" << e.msg(); + cerr << endl; + cerr << format(_("Resolvables from '%s' not loaded because of error.")) + % repo.alias() << endl; } - - ResStore store = repository.resolvables(); - //! \todo use format - cout_vv << "(" << store.size() << " resolvables found)" << endl; - - God->addResolvables(store); } - } void establish () Modified: trunk/zypper/src/zypper-search.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-search.cc?rev=5769&r1=5768&r2=5769&view=diff ============================================================================== --- trunk/zypper/src/zypper-search.cc (original) +++ trunk/zypper/src/zypper-search.cc Mon Jun 18 15:53:41 2007 @@ -38,18 +38,19 @@ _zypp(zypp), _options(options), _qstrings(qstrings) { cond_init_target(); // calls ZYpp::initializeTarget("/"); - cond_init_system_sources(); // calls manager->restore("/"); + init_repos(); // no sources warning - if (gData.sources.empty()) { - cerr << _("No sources. Zypper currently searches within installation" - "sources only.") << endl; - exit(2); // TODO #define zypper error codes? + if (gData.repos.empty()) { + cerr << _("No repositories configured. Please, add at least one" + " repository using 'zypper addrepo' command before using search.") + << endl; + exit(ZYPPER_EXIT_NO_REPOS); // TODO #define zypper error codes? } setupRegexp(); cacheInstalled(); - load_sources(); // populates ResPool with resolvables from inst. sources + load_repo_resolvables(); // populates ResPool with resolvables from repos // cache identification strings of source resolvables (used to check for // duplicates of target resolvables in sources - DuplicateFilter) Modified: trunk/zypper/src/zypper-sources.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-sources.cc?rev=5769&r1=5768&r2=5769&view=diff ============================================================================== --- trunk/zypper/src/zypper-sources.cc (original) +++ trunk/zypper/src/zypper-sources.cc Mon Jun 18 15:53:41 2007 @@ -176,7 +176,8 @@ { cerr << format(_("Error reading repository '%s':")) % repo.alias() << endl << e.msg() << endl; - cerr << format(_("Skipping repository '%s'")) % repo.alias() + cerr << format(_("Skipping repository '%s' because of the above error.")) + % repo.alias() << endl; } } Modified: trunk/zypper/src/zypper.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=5769&r1=5768&r2=5769&view=diff ============================================================================== --- trunk/zypper/src/zypper.cc (original) +++ trunk/zypper/src/zypper.cc Mon Jun 18 15:53:41 2007 @@ -629,8 +629,6 @@ cond_init_target (); return add_repo_by_url(url, alias, type, enabled, refresh); - - return ZYPPER_EXIT_OK; } // --------------------------( service delete )----------------------------- Modified: trunk/zypper/src/zypper.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.h?rev=5769&r1=5768&r2=5769&view=diff ============================================================================== --- trunk/zypper/src/zypper.h (original) +++ trunk/zypper/src/zypper.h Mon Jun 18 15:53:41 2007 @@ -39,6 +39,8 @@ #define ZYPPER_EXIT_ERR_INVALID_ARGS 3 // invalid arguments given, e.g. zypper source-add httttps://asdf.net #define ZYPPER_EXIT_ERR_ZYPP 4 // error indicated from within libzypp, e.g. God = zypp::getZYpp() threw an exception #define ZYPPER_EXIT_ERR_PRIVILEGES 5 // unsufficient privileges for the operation +#define ZYPPER_EXIT_NO_REPOS 6 // no repositories defined + // info #define ZYPPER_EXIT_INF_UPDATE_NEEDED 100 // update needed #define ZYPPER_EXIT_INF_SEC_UPDATE_NEEDED 101 // security update needed -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org