Author: mlandres Date: Mon Jul 14 15:24:17 2008 New Revision: 10578 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10578&view=rev Log: Remove obsolete references to Script/Message/Atom Modified: trunk/zypper/src/misc.cc trunk/zypper/src/solve-commit.cc trunk/zypper/src/utils/misc.cc Modified: trunk/zypper/src/misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/misc.cc?rev=10578&r1=10577&r2=10578&view=diff ============================================================================== --- trunk/zypper/src/misc.cc (original) +++ trunk/zypper/src/misc.cc Mon Jul 14 15:24:17 2008 @@ -45,14 +45,6 @@ return ResTraits<Product>::kind; if (lskind == "patch") return ResTraits<Patch>::kind; - if (lskind == "script") - return ResTraits<Script>::kind; - if (lskind == "message") - return ResTraits<Message>::kind; - if (lskind == "atom") - return ResTraits<Atom>::kind; -// if (lskind == "system") -// return ResTraits<SystemResObject>::kind; if (lskind == "srcpackage") return ResTraits<SrcPackage>::kind; // not recognized @@ -227,7 +219,7 @@ ResPool pool(God->pool()); DBG << "looking source for : " << arg << endl; - for_( srcit, pool.byIdentBegin<SrcPackage>(arg), + for_( srcit, pool.byIdentBegin<SrcPackage>(arg), pool.byIdentEnd<SrcPackage>(arg) ) { DBG << *srcit << endl; @@ -330,11 +322,11 @@ _("Installing source package %s-%s")) % srcpkg->name() % srcpkg->edition())); MIL << "Going to install srcpackage: " << srcpkg << endl; - + try { God->installSrcPackage(srcpkg); - + zypper.out().info(boost::str(format( _("Source package %s-%s successfully installed.")) % srcpkg->name() % srcpkg->edition())); @@ -345,7 +337,7 @@ zypper.out().error(ex, boost::str(format(_("Problem installing source package %s-%s:")) % srcpkg->name() % srcpkg->edition())); - + zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP); } } Modified: trunk/zypper/src/solve-commit.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/solve-commit.cc?rev=10578&r1=10577&r2=10578&view=diff ============================================================================== --- trunk/zypper/src/solve-commit.cc (original) +++ trunk/zypper/src/solve-commit.cc Mon Jul 14 15:24:17 2008 @@ -61,7 +61,7 @@ } unsigned int problem_count = God->resolver()->problems().size(); - unsigned int solution_count = solutions.size(); + unsigned int solution_count = solutions.size(); // without solutions, its useless to prompt if (solutions.empty()) @@ -211,7 +211,7 @@ cols = 77; #define INDENT " " -//! \todo make function to wrap & indent the text +//! \todo make function to wrap & indent the text for (setResObject::constPtr::const_iterator resit = it->second.begin(); resit != it->second.end(); ++resit) { @@ -329,7 +329,7 @@ cout << " type=\"" << it->first << "\""; cout << " name=\"" << res->name() << "\""; cout << " edition=\"" << res->edition() << "\""; - //! \todo cout << " edition-old=\"" << << "\""; + //! \todo cout << " edition-old=\"" << << "\""; cout << " arch=\"" << res->arch() << "\""; if (!res->summary().empty()) cout << " summary=\"" << xml_encode(res->summary()) << "\""; @@ -528,7 +528,7 @@ * sets zypper exit code to: * ZYPPER_EXIT_INF_REBOOT_NEEDED - if one of patches to be installed needs machine reboot, * ZYPPER_EXIT_INF_RESTART_NEEDED - if one of patches to be installed needs package manager restart - * + * * @return SUMMARY_* */ static int summary(Zypper & zypper) @@ -561,14 +561,12 @@ zypper.setExitCode(ZYPPER_EXIT_INF_RESTART_NEEDED); } - if ( it->status().isToBeInstalled() - && it->resolvable()->kind() != ResTraits<Atom>::kind ) + if ( it->status().isToBeInstalled() ) { DBG << "<install> "; to_be_installed[it->resolvable()->kind()].insert(it->resolvable()); } - if ( it->status().isToBeUninstalled() - && it->resolvable()->kind() != ResTraits<Atom>::kind ) + if ( it->status().isToBeUninstalled() ) { DBG << "<uninstall> "; to_be_removed[it->resolvable()->kind()].insert(it->resolvable()); @@ -814,7 +812,7 @@ } // save the setting - zypper.runtimeData().force_resolution = force_resolution; + zypper.runtimeData().force_resolution = force_resolution; DBG << "force resolution: " << force_resolution << endl; ostringstream s; @@ -859,8 +857,8 @@ /** * Run the solver. - * - * \return <tt>true</tt> if a solution has been found, <tt>false</tt> otherwise + * + * \return <tt>true</tt> if a solution has been found, <tt>false</tt> otherwise */ bool resolve(Zypper & zypper) { @@ -973,7 +971,7 @@ zypper.setExitCode(ZYPPER_EXIT_ERR_PRIVILEGES); return; } - + bool do_commit = false; if (zypper.runtimeData().force_resolution && (retv == SUMMARY_INSTALL_DOES_REMOVE || retv == SUMMARY_REMOVE_DOES_INSTALL)) @@ -1027,25 +1025,25 @@ try { gData.show_media_progress_hack = true; - + ostringstream s; s << _("committing"); MIL << "committing..."; - + ZYppCommitResult result; if (copts.count("dry-run")) { s << " " << _("(dry run)") << endl; MIL << "(dry run)"; zypper.out().info(s.str(), Out::HIGH); - + result = God->commit(ZYppCommitPolicy().dryRun(true)); } else { zypper.out().info(s.str(), Out::HIGH); - + result = God->commit( ZYppCommitPolicy().syncPoolAfterCommit(zypper.runningShell())); - + commit_done = true; } @@ -1056,7 +1054,7 @@ if (!result._errors.empty()) retv = ZYPPER_EXIT_ERR_ZYPP; - + s.clear(); s << result; zypper.out().info(s.str(), Out::HIGH); } @@ -1070,9 +1068,9 @@ } catch ( zypp::repo::RepoException & e ) { ZYPP_CAUGHT(e); - + RepoManager manager(zypper.globalOpts().rm_options ); - + bool refresh_needed = false; for(RepoInfo::urls_const_iterator it = e.info().baseUrlsBegin(); it != e.info().baseUrlsEnd(); ++it) @@ -1086,7 +1084,7 @@ break; } } - + std::string hint = _("Please see the above error message for a hint."); if (refresh_needed) { Modified: trunk/zypper/src/utils/misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/utils/misc.cc?rev=10578&r1=10577&r2=10578&view=diff ============================================================================== --- trunk/zypper/src/utils/misc.cc (original) +++ trunk/zypper/src/utils/misc.cc Mon Jul 14 15:24:17 2008 @@ -40,7 +40,7 @@ } //::rl_catch_signals = 0; - /* Get a line from the user. */ + /* Get a line from the user. */ line_read = ::readline ("zypper> "); /* If the line has any text in it, @@ -88,14 +88,6 @@ return _PL("product", "product", count); if (kind == ResTraits<Patch>::kind) return _PL("patch", "patches", count); - if (kind == ResTraits<Script>::kind) - return _PL("script", "scripts", count); - if (kind == ResTraits<Message>::kind) - return _PL("message", "messages", count); - if (kind == ResTraits<Atom>::kind) - return _PL("atom", "atoms", count); -// if (kind == ResTraits<SystemResObject>::kind) -// return _PL("system", "systems", count); if (kind == ResTraits<SrcPackage>::kind) return _PL("srcpackage", "srcpackages", count); // default @@ -221,14 +213,14 @@ media::MediaManager mm; media::MediaAccessId mid = mm.open(rpmurl); mm.attachDesiredMedia(mid); - + mm.provideFile(mid, rpmpath.basename()); Pathname localrpmpath = mm.localPath(mid, rpmpath.basename()); Pathname cachedrpmpath = cache_dir; filesystem::assert_dir(cachedrpmpath); bool error = filesystem::copy(localrpmpath, cachedrpmpath / localrpmpath.basename()); - + mm.release(mid); mm.close(mid); @@ -236,7 +228,7 @@ { Zypper::instance()->out().error( _("Problem copying the specified RPM file to the cache directory."), - _("Perhaps you are running out of disk space.")); + _("Perhaps you are running out of disk space.")); return Pathname(); } return cachedrpmpath / localrpmpath.basename(); @@ -284,7 +276,7 @@ DBG << "new capstr: " << new_capstr << endl; } } - + return new_capstr; } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org