Zypp Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2008
- 13 participants
- 545 discussions
[zypp-commit] r8963 - in /trunk/zypper/src: output/xmlout.rnc zypper-misc.cc
by jkupec@svn.opensuse.org 29 Feb '08
by jkupec@svn.opensuse.org 29 Feb '08
29 Feb '08
Author: jkupec
Date: Fri Feb 29 13:50:10 2008
New Revision: 8963
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8963&view=rev
Log:
- xml install summary added
Modified:
trunk/zypper/src/output/xmlout.rnc
trunk/zypper/src/zypper-misc.cc
Modified: trunk/zypper/src/output/xmlout.rnc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/output/xmlout.rnc?rev…
==============================================================================
--- trunk/zypper/src/output/xmlout.rnc (original)
+++ trunk/zypper/src/output/xmlout.rnc Fri Feb 29 13:50:10 2008
@@ -102,8 +102,28 @@
attribute interactive { xsd:boolean } # needs user interaction?
}
+solvable-element =
+ element solvable {
+ attribute type { "package" | "patch" | "pattern" | "product" },
+ attribute name { xsd:string },
+ attribute edition { xsd:string }, # target edition
+ attribute edition-old { xsd:string }?, # currently installed version in case of upgrade
+ attribute arch { xsd:string },
+ attribute summary { xsd:string }?,
+ text?
+ }
+
install-summary-element =
- element install-summary { empty } # TODO
+ element install-summary {
+ attribute download-size { xsd:integer }, # download size in bytes
+ attribute space-usage-diff { xsd:integer }, # used space before vs. after install difference in bytes
+ (
+ element to-install { solvable-element+ } |
+ element to-remove { solvable-element+ } |
+ element to-upgrade { solvable-element+ } |
+ element to-downgrade { solvable-element+ }
+ )*
+ }
repo-list-element =
element repo-list {
Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=89…
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Fri Feb 29 13:50:10 2008
@@ -581,10 +581,9 @@
typedef map<Resolvable::Kind,set<ResObject::constPtr> > KindToResObjectSet;
static void show_summary_resolvable_list(const string & label,
- KindToResObjectSet::const_iterator it,
- int verbosity)
+ KindToResObjectSet::const_iterator it,
+ Out & out)
{
- Out & out = Zypper::instance()->out();
ostringstream s;
s << endl << label << endl;
@@ -599,7 +598,7 @@
cols = 77;
#define INDENT " "
-
+//! \todo make function to wrap & indent the text
for (set<ResObject::constPtr>::const_iterator resit = it->second.begin();
resit != it->second.end(); ++resit)
{
@@ -638,6 +637,122 @@
out.info(s.str(), Out::QUIET); //! \todo special output needed for this
}
+typedef enum
+{
+ TO_UPGRADE,
+ TO_DOWNGRADE,
+ TO_INSTALL,
+ TO_REMOVE
+} SummaryType;
+
+static void xml_print_to_transact_tag(SummaryType stype, bool end = false)
+{
+ switch (stype)
+ {
+ case TO_UPGRADE:
+ cout << "<" << (end ? "/" : "") << "to-upgrade>" << endl;
+ break;
+ case TO_DOWNGRADE:
+ cout << "<" << (end ? "/" : "") << "to-downgrade>" << endl;
+ break;
+ case TO_INSTALL:
+ cout << "<" << (end ? "/" : "") << "to-install>" << endl;
+ break;
+ case TO_REMOVE:
+ cout << "<" << (end ? "/" : "") << "to-remove>" << endl;
+ break;
+ }
+}
+
+static void show_summary_of_type(Zypper & zypper,
+ SummaryType stype,
+ const KindToResObjectSet & summset)
+{
+ // xml install summary
+ if (zypper.out().type() == Out::TYPE_XML)
+ {
+ bool empty = true;
+ for (KindToResObjectSet::const_iterator it = summset.begin();
+ it != summset.end(); ++it)
+ if (!it->second.empty()) { empty = false; break; }
+ if (empty)
+ return;
+
+ xml_print_to_transact_tag(stype);
+
+ for (KindToResObjectSet::const_iterator it = summset.begin();
+ it != summset.end(); ++it)
+ for (set<ResObject::constPtr>::const_iterator resit = it->second.begin();
+ resit != it->second.end(); ++resit)
+ {
+ ResObject::constPtr res(*resit);
+
+ cout << "<solvable";
+ cout << " type=\"" << it->first << "\"";
+ cout << " name=\"" << res->name() << "\"";
+ cout << " edition=\"" << res->edition() << "\"";
+ //! \todo cout << " edition-old=\"" << << "\"";
+ cout << " arch=\"" << res->arch() << "\"";
+ if (!res->summary().empty())
+ cout << " summary=\"" << xml_encode(res->summary()) << "\"";
+ if (!res->description().empty())
+ cout << ">" << endl << xml_encode(res->description()) << "</solvable>" << endl;
+ else
+ cout << "/>" << endl;
+ }
+
+ xml_print_to_transact_tag(stype, true);
+
+ return;
+ }
+
+ // normal install summary
+ for (KindToResObjectSet::const_iterator it = summset.begin();
+ it != summset.end(); ++it)
+ {
+ string title;
+ switch (stype)
+ {
+ case TO_UPGRADE:
+ title = boost::str(format(_PL(
+ // TranslatorExplanation %s is a "package", "patch", "pattern", etc
+ "The following %s is going to be upgraded:",
+ "The following %s are going to be upgraded:",
+ it->second.size()
+ )) % kind_to_string_localized(it->first, it->second.size()));
+ break;
+ case TO_DOWNGRADE:
+ title = boost::str(format(_PL(
+ // TranslatorExplanation %s is a "package", "patch", "pattern", etc
+ "The following %s is going to be downgraded:",
+ // TranslatorExplanation %s is a "packages", "patches", "patterns", etc
+ "The following %s are going to be downgraded:",
+ it->second.size()
+ )) % kind_to_string_localized(it->first, it->second.size()));
+ break;
+ case TO_INSTALL:
+ title = boost::str(format(_PL(
+ // TranslatorExplanation %s is a "package", "patch", "pattern", etc
+ "The following NEW %s is going to be installed:",
+ // TranslatorExplanation %s is a "packages", "patches", "patterns", etc
+ "The following NEW %s are going to be installed:",
+ it->second.size()
+ )) % kind_to_string_localized(it->first, it->second.size()));
+ break;
+ case TO_REMOVE:
+ title = boost::str(format(_PL(
+ // TranslatorExplanation %s is a "package", "patch", "pattern", etc
+ "The following %s is going to be REMOVED:",
+ // TranslatorExplanation %s is a "packages", "patches", "patterns", etc
+ "The following %s are going to be REMOVED:",
+ it->second.size()
+ )) % kind_to_string_localized(it->first, it->second.size()));
+ break;
+ }
+
+ show_summary_resolvable_list(title, it, zypper.out());
+ }
+}
/**
* @return (-1) - nothing to do,
@@ -645,7 +760,7 @@
* 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
*/
-int show_summary(Zypper & zypper)
+int summary(Zypper & zypper)
{
int retv = -1; // nothing to do;
@@ -699,10 +814,6 @@
return retv;
}
- //! \todo no output for machines for now
- if (zypper.globalOpts().machine_readable)
- return retv;
-
KindToResObjectSet toinstall;
KindToResObjectSet toupgrade;
KindToResObjectSet todowngrade;
@@ -710,6 +821,7 @@
// iterate the to_be_installed to find installs/upgrades/downgrades + size info
ByteCount download_size, new_installed_size;
+
for (KindToResObjectSet::const_iterator it = to_be_installed.begin();
it != to_be_installed.end(); ++it)
{
@@ -757,64 +869,28 @@
new_installed_size -= (*resit)->size();
}
- // show summary
- for (KindToResObjectSet::const_iterator it = toupgrade.begin();
- it != toupgrade.end(); ++it)
- {
- string title = boost::str(format(_PL(
- // TranslatorExplanation %s is a "package", "patch", "pattern", etc
- "The following %s is going to be upgraded:",
- "The following %s are going to be upgraded:",
- it->second.size()
- )) % kind_to_string_localized(it->first, it->second.size()));
-
- show_summary_resolvable_list(title, it, zypper.globalOpts().verbosity);
- }
-
- for (KindToResObjectSet::const_iterator it = todowngrade.begin();
- it != todowngrade.end(); ++it)
- {
- string title = boost::str(format(_PL(
- // TranslatorExplanation %s is a "package", "patch", "pattern", etc
- "The following %s is going to be downgraded:",
- // TranslatorExplanation %s is a "packages", "patches", "patterns", etc
- "The following %s are going to be downgraded:",
- it->second.size()
- )) % kind_to_string_localized(it->first, it->second.size()));
-
- show_summary_resolvable_list(title, it, zypper.globalOpts().verbosity);
- }
-
- for (KindToResObjectSet::const_iterator it = toinstall.begin();
- it != toinstall.end(); ++it)
+ // "</install-summary>"
+ if (zypper.out().type() == Out::TYPE_XML)
{
- string title = boost::str(format(_PL(
- // TranslatorExplanation %s is a "package", "patch", "pattern", etc
- "The following NEW %s is going to be installed:",
- // TranslatorExplanation %s is a "packages", "patches", "patterns", etc
- "The following NEW %s are going to be installed:",
- it->second.size()
- )) % kind_to_string_localized(it->first, it->second.size()));
-
- show_summary_resolvable_list(title, it, zypper.globalOpts().verbosity);
+ cout << "<install-summary";
+ cout << " download-size=\"" << ((ByteCount::SizeType) download_size) << "\"";
+ cout << " space-usage-diff=\"" << ((ByteCount::SizeType) new_installed_size) << "\"";
+ cout << ">" << endl;
}
- for (KindToResObjectSet::const_iterator it = toremove.begin();
- it != toremove.end(); ++it)
- {
- string title = boost::str(format(_PL(
- // TranslatorExplanation %s is a "package", "patch", "pattern", etc
- "The following %s is going to be REMOVED:",
- // TranslatorExplanation %s is a "packages", "patches", "patterns", etc
- "The following %s are going to be REMOVED:",
- it->second.size()
- )) % kind_to_string_localized(it->first, it->second.size()));
+ // show summary
+ show_summary_of_type(zypper, TO_UPGRADE, toupgrade);
+ show_summary_of_type(zypper, TO_DOWNGRADE, todowngrade);
+ show_summary_of_type(zypper, TO_INSTALL, toinstall);
+ show_summary_of_type(zypper, TO_REMOVE, toremove);
- show_summary_resolvable_list(title, it, zypper.globalOpts().verbosity);
- }
+ // "</install-summary>"
+ if (zypper.out().type() == Out::TYPE_XML)
+ cout << "</install-summary>" << endl;
zypper.out().info("", Out::NORMAL, Out::TYPE_NORMAL); // visual separator
+ // count and download size info
ostringstream s;
if (download_size > 0)
{
@@ -1573,7 +1649,7 @@
// returns -1, 0, ZYPPER_EXIT_INF_REBOOT_NEEDED, or ZYPPER_EXIT_INF_RESTART_NEEDED
- int retv = show_summary(zypper);
+ int retv = summary(zypper);
bool was_installed = false;
if (retv >= 0) { // there are resolvables to install/uninstall
if (read_bool_answer(PROMPT_YN_INST_REMOVE_CONTINUE, _("Continue?"), true)) {
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r8962 - in /trunk/libzypp-testsuite: libzypp-testsuite-tools.spec.in package/libzypp-testsuite-tools.changes
by coolo@svn.opensuse.org 29 Feb '08
by coolo@svn.opensuse.org 29 Feb '08
29 Feb '08
Author: coolo
Date: Fri Feb 29 13:21:35 2008
New Revision: 8962
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8962&view=rev
Log:
fix build
Modified:
trunk/libzypp-testsuite/libzypp-testsuite-tools.spec.in
trunk/libzypp-testsuite/package/libzypp-testsuite-tools.changes
Modified: trunk/libzypp-testsuite/libzypp-testsuite-tools.spec.in
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/libzypp-testsu…
==============================================================================
--- trunk/libzypp-testsuite/libzypp-testsuite-tools.spec.in (original)
+++ trunk/libzypp-testsuite/libzypp-testsuite-tools.spec.in Fri Feb 29 13:21:35 2008
@@ -81,6 +81,7 @@
%files
%defattr(0755,root,root)
+%dir %{prefix}/lib/zypp
%dir %{prefix}/lib/zypp/testsuite/
%dir %{prefix}/lib/zypp/testsuite/bin
%{prefix}/lib/zypp/testsuite/bin/
Modified: trunk/libzypp-testsuite/package/libzypp-testsuite-tools.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/package/libzyp…
==============================================================================
--- trunk/libzypp-testsuite/package/libzypp-testsuite-tools.changes (original)
+++ trunk/libzypp-testsuite/package/libzypp-testsuite-tools.changes Fri Feb 29 13:21:35 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Fri Feb 29 13:21:53 CET 2008 - coolo(a)suse.de
+
+- fix file list
+
+-------------------------------------------------------------------
Tue Feb 26 12:14:37 CET 2008 - schubi(a)suse.de
- using SAT helix parser
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r8961 - /trunk/libzypp-testsuite/solver/src/deptestomatic.cc
by schubi2@svn.opensuse.org 29 Feb '08
by schubi2@svn.opensuse.org 29 Feb '08
29 Feb '08
Author: schubi2
Date: Fri Feb 29 12:55:35 2008
New Revision: 8961
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8961&view=rev
Log:
Repo moved to Repository
Modified:
trunk/libzypp-testsuite/solver/src/deptestomatic.cc
Modified: trunk/libzypp-testsuite/solver/src/deptestomatic.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/src/dep…
==============================================================================
--- trunk/libzypp-testsuite/solver/src/deptestomatic.cc (original)
+++ trunk/libzypp-testsuite/solver/src/deptestomatic.cc Fri Feb 29 12:55:35 2008
@@ -72,7 +72,7 @@
#include "zypp/pool/GetResolvablesToInsDel.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
#include "zypp/solver/detail/Resolver.h"
#include "zypp/solver/detail/InstallOrder.h"
@@ -222,7 +222,7 @@
res = lhs->arch().compare( rhs->arch() );
if ( res )
return res < 0;
- res = lhs->satSolvable().repo().info().alias().compare( rhs->satSolvable().repo().info().alias() );
+ res = lhs->satSolvable().repository().info().alias().compare( rhs->satSolvable().repository().info().alias() );
if ( res )
return res < 0;
// no more criteria, still equal:
@@ -588,7 +588,7 @@
try {
cout << "Load from File '" << pathname << "'" << endl;
MIL << "Load from File '" << pathname << "'" << endl;
- zypp::Repo satRepo;
+ zypp::Repository satRepo;
if (alias == "@System") {
satRepo = zypp::sat::Pool::instance().systemRepo();
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r8960 - in /trunk/libzypp/zypp: ResFilters.h ResObject.cc ResObject.h
by schubi2@svn.opensuse.org 29 Feb '08
by schubi2@svn.opensuse.org 29 Feb '08
29 Feb '08
Author: schubi2
Date: Fri Feb 29 12:54:58 2008
New Revision: 8960
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8960&view=rev
Log:
- added ByRepository again (Should be better in Filter.h"
- Bugfix in getting repository
Modified:
trunk/libzypp/zypp/ResFilters.h
trunk/libzypp/zypp/ResObject.cc
trunk/libzypp/zypp/ResObject.h
Modified: trunk/libzypp/zypp/ResFilters.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResFilters.h?rev=89…
==============================================================================
--- trunk/libzypp/zypp/ResFilters.h (original)
+++ trunk/libzypp/zypp/ResFilters.h Fri Feb 29 12:54:58 2008
@@ -19,6 +19,7 @@
#include "zypp/CapFilters.h"
#include "zypp/PoolItem.h"
+#include "zypp/Repository.h"
#include "zypp/CapAndItem.h"
///////////////////////////////////////////////////////////////////
@@ -184,6 +185,25 @@
std::string _name;
};
+ /** Select ResObject by repository or repository alias. */
+ struct ByRepository : public ResObjectFilterFunctor
+ {
+ ByRepository( Repository repository_r )
+ : _alias( repository_r.info().alias() )
+ {}
+
+ ByRepository( const std::string & alias_r )
+ : _alias( alias_r )
+ {}
+
+ bool operator()( ResObject::constPtr p ) const
+ {
+ return p->repoInfo().alias() == _alias;
+ }
+
+ std::string _alias;
+ };
+
/** Select ResObject by Edition using \a _Compare functor.
*
* Selects ResObject if <tt>_Compare( ResObject->edition(), _edition )</tt>
Modified: trunk/libzypp/zypp/ResObject.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.cc?rev=89…
==============================================================================
--- trunk/libzypp/zypp/ResObject.cc (original)
+++ trunk/libzypp/zypp/ResObject.cc Fri Feb 29 12:54:58 2008
@@ -85,9 +85,6 @@
RepoInfo ResObject::repoInfo() const
{ return repository().info(); }
- Repository ResObject::repository() const
- { return repository(); }
-
unsigned ResObject::mediaNr() const
{ return lookupNumAttribute( sat::SolvAttr::medianr ); }
Modified: trunk/libzypp/zypp/ResObject.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.h?rev=896…
==============================================================================
--- trunk/libzypp/zypp/ResObject.h (original)
+++ trunk/libzypp/zypp/ResObject.h Fri Feb 29 12:54:58 2008
@@ -63,6 +63,9 @@
using sat::Solvable::supportsRequestedLocales;
/** Return the supported locales via locales_r. */
using sat::Solvable::getSupportedLocales;
+
+ using sat::Solvable::repository;;
+
//@}
public:
@@ -121,11 +124,6 @@
*/
RepoInfo repoInfo() const;
- /** \ref Repository
- * providing this resolvable.
- */
- Repository repository() const;
-
/**
* Media number where the resolvable is located
* 0 if no media access is required.
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r8959 - in /trunk/libzypp/zypp: ./ pool/ repo/ sat/ sat/detail/ solver/detail/ target/ target/rpm/
by schubi2@svn.opensuse.org 29 Feb '08
by schubi2@svn.opensuse.org 29 Feb '08
29 Feb '08
Author: schubi2
Date: Fri Feb 29 11:43:18 2008
New Revision: 8959
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8959&view=rev
Log:
libzypp Repository class has been exchanged by the SAT repo
Added:
trunk/libzypp/zypp/Repository.cc
- copied, changed from r8945, trunk/libzypp/zypp/Repo.cc
trunk/libzypp/zypp/Repository.h
- copied, changed from r8945, trunk/libzypp/zypp/Repo.h
Removed:
trunk/libzypp/zypp/Repo.cc
trunk/libzypp/zypp/Repo.h
trunk/libzypp/zypp/repo/RepositoryImpl.cc
trunk/libzypp/zypp/repo/RepositoryImpl.h
Modified:
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/PoolQuery.cc
trunk/libzypp/zypp/Product.cc
trunk/libzypp/zypp/RepoManager.cc
trunk/libzypp/zypp/RepoManager.h
trunk/libzypp/zypp/ResFilters.h
trunk/libzypp/zypp/ResObject.cc
trunk/libzypp/zypp/ResObject.h
trunk/libzypp/zypp/ResPool.h
trunk/libzypp/zypp/ResPoolProxy.h
trunk/libzypp/zypp/ZYppCallbacks.h
trunk/libzypp/zypp/pool/GetResolvablesToInsDel.cc
trunk/libzypp/zypp/pool/PoolImpl.cc
trunk/libzypp/zypp/pool/PoolImpl.h
trunk/libzypp/zypp/pool/PoolTraits.h
trunk/libzypp/zypp/repo/DeltaCandidates.cc
trunk/libzypp/zypp/repo/DeltaCandidates.h
trunk/libzypp/zypp/repo/PackageProvider.cc
trunk/libzypp/zypp/repo/PackageProvider.h
trunk/libzypp/zypp/repo/RepoProvideFile.cc
trunk/libzypp/zypp/repo/RepoProvideFile.h
trunk/libzypp/zypp/repo/ScriptProvider.cc
trunk/libzypp/zypp/repo/SrcPackageProvider.cc
trunk/libzypp/zypp/sat/Pool.cc
trunk/libzypp/zypp/sat/Pool.h
trunk/libzypp/zypp/sat/SATResolver.cc
trunk/libzypp/zypp/sat/Solvable.cc
trunk/libzypp/zypp/sat/Solvable.h
trunk/libzypp/zypp/sat/detail/PoolMember.h
trunk/libzypp/zypp/solver/detail/Helper.cc
trunk/libzypp/zypp/solver/detail/Testcase.cc
trunk/libzypp/zypp/solver/detail/Testcase.h
trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc
trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.h
trunk/libzypp/zypp/target/TargetImpl.cc
trunk/libzypp/zypp/target/rpm/RpmDb.cc
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=…
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Fri Feb 29 11:43:18 2008
@@ -53,7 +53,6 @@
Rel.cc
RepoInfo.cc
RepoManager.cc
- Repository.cc
RepoStatus.cc
ResKind.cc
ResObject.cc
@@ -77,7 +76,7 @@
ZYppCommitPolicy.cc
ZYppCommitResult.cc
ZYppFactory.cc
- Repo.cc
+ Repository.cc
)
SET( zypp_EARLY_SRCS
ZConfig.cc
@@ -149,7 +148,6 @@
Rel.h
RepoInfo.h
RepoManager.h
- Repository.h
RepoStatus.h
Filter.h
ResFilters.h
@@ -181,7 +179,7 @@
ZYppCommitResult.h
ZYppFactory.h
ZYpp.h
- Repo.h
+ Repository.h
)
INSTALL( FILES ${zypp_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/zypp" )
@@ -706,7 +704,6 @@
SET( zypp_repo_SRCS
repo/dummy.cc
- repo/RepositoryImpl.cc
repo/RepoException.cc
repo/RepoType.cc
repo/PackageProvider.cc
@@ -723,7 +720,6 @@
)
SET( zypp_repo_HEADERS
- repo/RepositoryImpl.h
repo/RepoException.h
repo/RepoType.h
repo/PackageProvider.h
Modified: trunk/libzypp/zypp/PoolQuery.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/PoolQuery.cc?rev=89…
==============================================================================
--- trunk/libzypp/zypp/PoolQuery.cc (original)
+++ trunk/libzypp/zypp/PoolQuery.cc Fri Feb 29 11:43:18 2008
@@ -165,7 +165,7 @@
_pimpl->_fnc = fnc;
sat::Pool pool(sat::Pool::instance());
- for ( sat::Pool::RepoIterator itr = pool.reposBegin();
+ for ( sat::Pool::RepositoryIterator itr = pool.reposBegin();
itr != pool.reposEnd();
++itr )
{
Modified: trunk/libzypp/zypp/Product.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Product.cc?rev=8959…
==============================================================================
--- trunk/libzypp/zypp/Product.cc (original)
+++ trunk/libzypp/zypp/Product.cc Fri Feb 29 11:43:18 2008
@@ -10,6 +10,7 @@
*
*/
#include "zypp/Product.h"
+#include "zypp/Url.h"
///////////////////////////////////////////////////////////////////
namespace zypp
Modified: trunk/libzypp/zypp/RepoManager.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=…
==============================================================================
--- trunk/libzypp/zypp/RepoManager.cc (original)
+++ trunk/libzypp/zypp/RepoManager.cc Fri Feb 29 11:43:18 2008
@@ -913,7 +913,7 @@
if ( ! PathInfo(solvfile).isExist() )
ZYPP_THROW(RepoNotCachedException());
- Repo repo = satpool.addRepoSolv(solvfile, info);
+ Repository repo = satpool.addRepoSolv(solvfile, info);
}
////////////////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/RepoManager.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.h?rev=8…
==============================================================================
--- trunk/libzypp/zypp/RepoManager.h (original)
+++ trunk/libzypp/zypp/RepoManager.h Fri Feb 29 11:43:18 2008
@@ -18,7 +18,6 @@
#include "zypp/base/PtrTypes.h"
#include "zypp/Pathname.h"
#include "zypp/ZConfig.h"
-#include "zypp/Repository.h"
#include "zypp/RepoInfo.h"
#include "zypp/repo/RepoException.h"
#include "zypp/repo/RepoType.h"
Copied: trunk/libzypp/zypp/Repository.cc (from r8945, trunk/libzypp/zypp/Repo.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.cc?p2=tr…
==============================================================================
--- trunk/libzypp/zypp/Repo.cc (original)
+++ trunk/libzypp/zypp/Repository.cc Fri Feb 29 11:43:18 2008
@@ -6,7 +6,7 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp/sat/Repo.cc
+/** \file zypp/sat/Repository.cc
*
*/
#include <iostream>
@@ -19,7 +19,7 @@
#include "zypp/Pathname.h"
#include "zypp/sat/detail/PoolImpl.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
#include "zypp/sat/Pool.h"
using std::endl;
@@ -29,76 +29,76 @@
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- const Repo Repo::norepo;
+ const Repository Repository::noRepository;
/////////////////////////////////////////////////////////////////
- ::_Repo * Repo::get() const
+ ::_Repo * Repository::get() const
{ return myPool().getRepo( _id ); }
-#define NO_REPO_RETURN( VAL ) \
+#define NO_REPOSITORY_RETURN( VAL ) \
::_Repo * _repo( get() ); \
if ( ! _repo ) return VAL
-#define NO_REPO_THROW( VAL ) \
+#define NO_REPOSITORY_THROW( VAL ) \
::_Repo * _repo( get() ); \
if ( ! _repo ) ZYPP_THROW( VAL )
- bool Repo::isSystemRepo() const
+ bool Repository::isSystemRepo() const
{
- NO_REPO_RETURN( false );
+ NO_REPOSITORY_RETURN( false );
return( sat::Pool::systemRepoName() == _repo->name );
}
- std::string Repo::name() const
+ std::string Repository::name() const
{
- NO_REPO_RETURN( std::string() );
+ NO_REPOSITORY_RETURN( std::string() );
if ( ! _repo->name )
return std::string();
return _repo->name;
}
- bool Repo::solvablesEmpty() const
+ bool Repository::solvablesEmpty() const
{
- NO_REPO_RETURN( true );
+ NO_REPOSITORY_RETURN( true );
return _repo->nsolvables;
}
- Repo::size_type Repo::solvablesSize() const
+ Repository::size_type Repository::solvablesSize() const
{
- NO_REPO_RETURN( 0 );
+ NO_REPOSITORY_RETURN( 0 );
return _repo->nsolvables;
}
- Repo::SolvableIterator Repo::solvablesBegin() const
+ Repository::SolvableIterator Repository::solvablesBegin() const
{
- NO_REPO_RETURN( make_filter_iterator( detail::ByRepo( *this ),
+ NO_REPOSITORY_RETURN( make_filter_iterator( detail::ByRepository( *this ),
sat::detail::SolvableIterator(),
sat::detail::SolvableIterator() ) );
- return make_filter_iterator( detail::ByRepo( *this ),
+ return make_filter_iterator( detail::ByRepository( *this ),
sat::detail::SolvableIterator(_repo->start),
sat::detail::SolvableIterator(_repo->end) );
}
- Repo::SolvableIterator Repo::solvablesEnd() const
+ Repository::SolvableIterator Repository::solvablesEnd() const
{
- NO_REPO_RETURN( make_filter_iterator( detail::ByRepo( *this ),
+ NO_REPOSITORY_RETURN( make_filter_iterator( detail::ByRepository( *this ),
sat::detail::SolvableIterator(),
sat::detail::SolvableIterator() ) );
- return make_filter_iterator(detail::ByRepo( *this ),
+ return make_filter_iterator(detail::ByRepository( *this ),
sat::detail::SolvableIterator(_repo->end),
sat::detail::SolvableIterator(_repo->end) );
}
- RepoInfo Repo::info() const
+ RepoInfo Repository::info() const
{
- NO_REPO_RETURN( RepoInfo() );
+ NO_REPOSITORY_RETURN( RepoInfo() );
return myPool().repoInfo( _repo );
}
- void Repo::setInfo( const RepoInfo & info_r )
+ void Repository::setInfo( const RepoInfo & info_r )
{
- NO_REPO_THROW( Exception( _("Can't set RepoInfo for norepo.") ) );
+ NO_REPOSITORY_THROW( Exception( _("Can't set RepoInfo for norepo.") ) );
if ( info_r.alias() != name() )
{
ZYPP_THROW( Exception( str::form( _("RepoInfo alias (%s) does not match repository name (%s)"),
@@ -107,23 +107,23 @@
myPool().setRepoInfo( _repo, info_r );
}
- void Repo::clearInfo()
+ void Repository::clearInfo()
{
- NO_REPO_RETURN();
+ NO_REPOSITORY_RETURN();
myPool().setRepoInfo( _repo, RepoInfo() );
}
- void Repo::eraseFromPool()
+ void Repository::eraseFromPool()
{
- NO_REPO_RETURN();
+ NO_REPOSITORY_RETURN();
myPool()._deleteRepo( _repo );
_id = sat::detail::noRepoId;
}
#warning NEED POOL MANIP EXEPTIONS
- void Repo::addSolv( const Pathname & file_r )
+ void Repository::addSolv( const Pathname & file_r )
{
- NO_REPO_THROW( Exception( _("Can't add solvables to norepo.") ) );
+ NO_REPOSITORY_THROW( Exception( _("Can't add solvables to norepo.") ) );
AutoDispose<FILE*> file( ::fopen( file_r.c_str(), "r" ), ::fclose );
if ( file == NULL )
@@ -138,9 +138,9 @@
}
}
- sat::detail::SolvableIdType Repo::addSolvables( unsigned count_r )
+ sat::detail::SolvableIdType Repository::addSolvables( unsigned count_r )
{
- NO_REPO_THROW( Exception( _("Can't add solvables to norepo.") ) );
+ NO_REPOSITORY_THROW( Exception( _("Can't add solvables to norepo.") ) );
return myPool()._addSolvables( _repo, count_r );
}
@@ -149,7 +149,7 @@
** FUNCTION NAME : operator<<
** FUNCTION TYPE : std::ostream &
*/
- std::ostream & operator<<( std::ostream & str, const Repo & obj )
+ std::ostream & operator<<( std::ostream & str, const Repository & obj )
{
if ( ! obj )
return str << "sat::repo()";
Copied: trunk/libzypp/zypp/Repository.h (from r8945, trunk/libzypp/zypp/Repo.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.h?p2=tru…
==============================================================================
--- trunk/libzypp/zypp/Repo.h (original)
+++ trunk/libzypp/zypp/Repository.h Fri Feb 29 11:43:18 2008
@@ -6,66 +6,62 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp/Repo.h
+/** \file zypp/Repository.h
*
*/
-#ifndef ZYPP_SAT_REPO_H
-#define ZYPP_SAT_REPO_H
+#ifndef ZYPP_SAT_REPOSITORY_H
+#define ZYPP_SAT_REPOSITORY_H
#include <iosfwd>
-
#include "zypp/base/SafeBool.h"
-
+#include "zypp/Pathname.h"
#include "zypp/sat/detail/PoolMember.h"
#include "zypp/sat/Solvable.h"
+#include "zypp/RepoInfo.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- class Pathname;
- class RepoInfo;
-
-
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : Repo
+ // CLASS NAME : Repository
//
/** */
- class Repo : protected sat::detail::PoolMember,
- private base::SafeBool<Repo>
+ class Repository : protected sat::detail::PoolMember,
+ private base::SafeBool<Repository>
{
public:
- typedef filter_iterator<detail::ByRepo, sat::detail::SolvableIterator> SolvableIterator;
+ typedef filter_iterator<detail::ByRepository, sat::detail::SolvableIterator> SolvableIterator;
typedef sat::detail::size_type size_type;
public:
- /** Default ctor creates \ref norepo.*/
- Repo()
+ /** Default ctor creates \ref noRepository.*/
+ Repository()
: _id( sat::detail::noRepoId ) {}
/** \ref PoolImpl ctor. */
- explicit Repo( sat::detail::RepoIdType id_r )
+ explicit Repository( sat::detail::RepoIdType id_r )
: _id( id_r ) {}
public:
- /** Represents no \ref Repo. */
- static const Repo norepo;
+ /** Represents no \ref Repository. */
+ static const Repository noRepository;
- /** Evaluate \ref Repo in a boolean context (\c != \c norepo). */
- using base::SafeBool<Repo>::operator bool_type;
+ /** Evaluate \ref Repository in a boolean context (\c != \c noRepository). */
+ using base::SafeBool<Repository>::operator bool_type;
- /** Return whether this is the system repo. */
+ /** Return whether this is the system repository. */
bool isSystemRepo() const;
public:
/** The repos name (alias). */
std::string name() const;
- /** Whether \ref Repo contains solvables. */
+ /** Whether \ref Repository contains solvables. */
bool solvablesEmpty() const;
- /** Number of solvables in \ref Repo. */
+ /** Number of solvables in \ref Repository. */
size_type solvablesSize() const;
/** Iterator to the first \ref Solvable. */
@@ -79,9 +75,9 @@
RepoInfo info() const;
/** Set \ref RepoInfo for this repository.
- * \throws Exception if this is \ref norepo
+ * \throws Exception if this is \ref noRepository
* \throws Exception if the \ref RepoInfo::alias
- * does not match the \ref Repo::name.
+ * does not match the \ref Repository::name.
*/
void setInfo( const RepoInfo & info_r );
@@ -89,27 +85,27 @@
void clearInfo();
public:
- /** Remove this \ref Repo from it's \ref Pool. */
+ /** Remove this \ref Repository from it's \ref Pool. */
void eraseFromPool();
/** Functor calling \ref eraseFromPool. */
struct EraseFromPool;
public:
- /** \name Repo content manipulating methods.
- * \todo maybe a separate Repo/Solvable content manip interface
+ /** \name Repository content manipulating methods.
+ * \todo maybe a separate Repository/Solvable content manip interface
* provided by the pool.
*/
//@{
/** Load \ref Solvables from a solv-file.
- * In case of an exception the repo remains in the \ref Pool.
- * \throws Exception if this is \ref norepo
+ * In case of an exception the repository remains in the \ref Pool.
+ * \throws Exception if this is \ref noRepository
* \throws Exception if loading the solv-file fails.
- * \see \ref Pool::addRepoSolv and \ref Repo::EraseFromPool
+ * \see \ref Pool::addRepoSolv and \ref Repository::EraseFromPool
*/
void addSolv( const Pathname & file_r );
- /** Add \c count_r new empty \ref Solvable to this \ref Repo. */
+ /** Add \c count_r new empty \ref Solvable to this \ref Repository. */
sat::detail::SolvableIdType addSolvables( unsigned count_r );
/** \overload Add only one new \ref Solvable. */
sat::detail::SolvableIdType addSolvable()
@@ -122,42 +118,42 @@
/** Expert backdoor. */
sat::detail::RepoIdType id() const { return _id; }
private:
- friend base::SafeBool<Repo>::operator bool_type() const;
+ friend base::SafeBool<Repository>::operator bool_type() const;
bool boolTest() const { return get(); }
private:
sat::detail::RepoIdType _id;
};
///////////////////////////////////////////////////////////////////
- /** \relates Repo Stream output */
- std::ostream & operator<<( std::ostream & str, const Repo & obj );
+ /** \relates Repository Stream output */
+ std::ostream & operator<<( std::ostream & str, const Repository & obj );
- /** \relates Repo */
- inline bool operator==( const Repo & lhs, const Repo & rhs )
+ /** \relates Repository */
+ inline bool operator==( const Repository & lhs, const Repository & rhs )
{ return lhs.get() == rhs.get(); }
- /** \relates Repo */
- inline bool operator!=( const Repo & lhs, const Repo & rhs )
+ /** \relates Repository */
+ inline bool operator!=( const Repository & lhs, const Repository & rhs )
{ return lhs.get() != rhs.get(); }
/** \relates Repository */
- inline bool operator<( const Repo & lhs, const Repo & rhs )
+ inline bool operator<( const Repository & lhs, const Repository & rhs )
{ return lhs.get() < rhs.get(); }
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : Repo::EraseFromPool
+ // CLASS NAME : Repository::EraseFromPool
//
- /** Functor removing \ref Repo from it's \ref Pool.
+ /** Functor removing \ref Repository from it's \ref Pool.
*
* E.g. used as dispose function in. \ref AutoDispose
* to provide a convenient and exception safe temporary
- * \ref Repo.
+ * \ref Repository.
* \code
* sat::Pool satpool;
* MIL << "1 " << satpool << endl;
* {
- * AutoDispose<sat::Repo> tmprepo( (sat::Repo::EraseFromPool()) );
+ * AutoDispose<Repository> tmprepo( (Repository::EraseFromPool()) );
* *tmprepo = satpool.reposInsert( "A" );
* tmprepo->addSolv( "sl10.1-beta7-packages.solv" );
* DBG << "2 " << satpool << endl;
@@ -174,62 +170,61 @@
* Leaving the block without calling <tt>tmprepo.resetDispose();</tt>
* before, will automatically remove the \ref Repo from it's \ref Pool.
*/
- struct Repo::EraseFromPool
+ struct Repository::EraseFromPool
{
- void operator()( Repo repo_r ) const
- { repo_r.eraseFromPool(); }
+ void operator()( Repository repository_r ) const
+ { repository_r.eraseFromPool(); }
};
///////////////////////////////////////////////////////////////////
-
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : RepoIterator
+ // CLASS NAME : RepositoryIterator
//
/** */
- class RepoIterator : public boost::iterator_adaptor<
- RepoIterator // Derived
+ class RepositoryIterator : public boost::iterator_adaptor<
+ RepositoryIterator // Derived
, ::_Repo ** // Base
- , Repo // Value
+ , Repository // Value
, boost::forward_traversal_tag // CategoryOrTraversal
- , Repo // Reference
+ , Repository // Reference
>
{
public:
- RepoIterator()
- : RepoIterator::iterator_adaptor_( 0 )
+ RepositoryIterator()
+ : RepositoryIterator::iterator_adaptor_( 0 )
{}
- explicit RepoIterator( ::_Repo ** p )
- : RepoIterator::iterator_adaptor_( p )
+ explicit RepositoryIterator( ::_Repo ** p )
+ : RepositoryIterator::iterator_adaptor_( p )
{}
private:
friend class boost::iterator_core_access;
- Repo dereference() const
- { return Repo( *base() ); }
+ Repository dereference() const
+ { return Repository( *base() ); }
};
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : ByRepo
+ // CLASS NAME : ByRepository
//
- /** Functor filtering \ref Solvable by \ref Repo.*/
- struct ByRepo
+ /** Functor filtering \ref Solvable by \ref Repository.*/
+ struct ByRepository
{
public:
- ByRepo( const Repo & repo_r ) : _repo( repo_r ) {}
- ByRepo( sat::detail::RepoIdType id_r ) : _repo( id_r ) {}
- ByRepo() {}
+ ByRepository( const Repository & repository_r ) : _repository( repository_r ) {}
+ ByRepository( sat::detail::RepoIdType id_r ) : _repository( id_r ) {}
+ ByRepository() {}
bool operator()( const sat::Solvable & slv_r ) const
- { return slv_r.repo() == _repo; }
+ { return slv_r.repository() == _repository; }
private:
- Repo _repo;
+ Repository _repository;
};
///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
@@ -239,4 +234,4 @@
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
-#endif // ZYPP_SAT_REPO_H
+#endif // ZYPP_SAT_REPOSITORY_H
Modified: trunk/libzypp/zypp/ResFilters.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResFilters.h?rev=89…
==============================================================================
--- trunk/libzypp/zypp/ResFilters.h (original)
+++ trunk/libzypp/zypp/ResFilters.h Fri Feb 29 11:43:18 2008
@@ -24,7 +24,6 @@
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- class Repository;
///////////////////////////////////////////////////////////////////
namespace resfilter
{ /////////////////////////////////////////////////////////////////
@@ -185,27 +184,6 @@
std::string _name;
};
-
- /** Select ResObject by repository or repository alias. */
- struct ByRepository : public ResObjectFilterFunctor
- {
- ByRepository( Repository repository_r )
- : _alias( repository_r.info().alias() )
- {}
-
- ByRepository( const std::string & alias_r )
- : _alias( alias_r )
- {}
-
- bool operator()( ResObject::constPtr p ) const
- {
- return p->repoInfo().alias() == _alias;
- }
-
- std::string _alias;
- };
-
-
/** Select ResObject by Edition using \a _Compare functor.
*
* Selects ResObject if <tt>_Compare( ResObject->edition(), _edition )</tt>
Modified: trunk/libzypp/zypp/ResObject.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.cc?rev=89…
==============================================================================
--- trunk/libzypp/zypp/ResObject.cc (original)
+++ trunk/libzypp/zypp/ResObject.cc Fri Feb 29 11:43:18 2008
@@ -12,10 +12,10 @@
#include <zypp/base/Logger.h>
#include "zypp/ResObject.h"
-#include "zypp/Repository.h"
#include "zypp/sat/SolvAttr.h"
#include "zypp/sat/Solvable.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
+#include "zypp/RepoInfo.h"
using namespace zypp;
using namespace std;
@@ -83,7 +83,10 @@
{ return ByteCount( lookupNumAttribute( sat::SolvAttr::downloadsize ), ByteCount::K ); }
RepoInfo ResObject::repoInfo() const
- { return repo().info(); }
+ { return repository().info(); }
+
+ Repository ResObject::repository() const
+ { return repository(); }
unsigned ResObject::mediaNr() const
{ return lookupNumAttribute( sat::SolvAttr::medianr ); }
Modified: trunk/libzypp/zypp/ResObject.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.h?rev=895…
==============================================================================
--- trunk/libzypp/zypp/ResObject.h (original)
+++ trunk/libzypp/zypp/ResObject.h Fri Feb 29 11:43:18 2008
@@ -19,9 +19,9 @@
#include "zypp/Date.h"
#include "zypp/ByteCount.h"
#include "zypp/DiskUsage.h"
-#include "zypp/Repository.h"
#include "zypp/TranslatedText.h"
#include "zypp/OnMediaLocation.h"
+#include "zypp/Repository.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -121,10 +121,10 @@
*/
RepoInfo repoInfo() const;
- /** \deprecated \ref repoInfo is provided directly.
- */
- ZYPP_DEPRECATED Repository repository() const
- { return Repository( repoInfo() ); }
+ /** \ref Repository
+ * providing this resolvable.
+ */
+ Repository repository() const;
/**
* Media number where the resolvable is located
Modified: trunk/libzypp/zypp/ResPool.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResPool.h?rev=8959&…
==============================================================================
--- trunk/libzypp/zypp/ResPool.h (original)
+++ trunk/libzypp/zypp/ResPool.h Fri Feb 29 11:43:18 2008
@@ -56,7 +56,7 @@
typedef pool::PoolTraits::byCapabilityIndex_iterator byCapabilityIndex_iterator;
typedef pool::PoolTraits::AdditionalCapabilities AdditionalCapabilities;
- typedef pool::PoolTraits::repository_iterator repository_iterator;
+ typedef pool::PoolTraits::repository_iterator repository_iterator;
public:
/** Singleton ctor. */
Modified: trunk/libzypp/zypp/ResPoolProxy.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResPoolProxy.h?rev=…
==============================================================================
--- trunk/libzypp/zypp/ResPoolProxy.h (original)
+++ trunk/libzypp/zypp/ResPoolProxy.h Fri Feb 29 11:43:18 2008
@@ -46,7 +46,7 @@
typedef SelectableIndex::const_iterator const_iterator;
typedef SelectableIndex::size_type size_type;
- typedef ResPool::repository_iterator repository_iterator;
+ typedef ResPool::repository_iterator repository_iterator;
public:
Modified: trunk/libzypp/zypp/ZYppCallbacks.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ZYppCallbacks.h?rev…
==============================================================================
--- trunk/libzypp/zypp/ZYppCallbacks.h (original)
+++ trunk/libzypp/zypp/ZYppCallbacks.h Fri Feb 29 11:43:18 2008
@@ -14,7 +14,7 @@
#include "zypp/Callback.h"
#include "zypp/Resolvable.h"
-#include "zypp/Repository.h"
+#include "zypp/RepoInfo.h"
#include "zypp/Pathname.h"
#include "zypp/Message.h"
#include "zypp/Url.h"
@@ -34,7 +34,7 @@
{ return true; }
// virtual Action problem(
-// Repository /*source*/
+// Repo /*source*/
// , Error /*error*/
// , const std::string &/*description*/ )
// { return ABORT; }
Modified: trunk/libzypp/zypp/pool/GetResolvablesToInsDel.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/pool/GetResolvables…
==============================================================================
--- trunk/libzypp/zypp/pool/GetResolvablesToInsDel.cc (original)
+++ trunk/libzypp/zypp/pool/GetResolvablesToInsDel.cc Fri Feb 29 11:43:18 2008
@@ -13,10 +13,9 @@
#include <set>
#include "zypp/base/Logger.h"
-
+#include "zypp/sat/Solvable.h"
#include "zypp/pool/GetResolvablesToInsDel.h"
#include "zypp/pool/PoolStats.h"
-
#include "zypp/solver/detail/InstallOrder.h"
using std::endl;
@@ -232,7 +231,7 @@
continue;
}
- if ( cobj->satSolvable().repo().id() == last_prio &&
+ if ( cobj->satSolvable().repository().id() == last_prio &&
cobj->mediaNr() == last_medianum ) {
// prefer packages on current media.
XXX << "Stay with current media " << *cit << endl;
@@ -250,9 +249,9 @@
if ( cobj->mediaNr() < best_medianum ) {
best_list.clear(); // new best
} else if ( cobj->mediaNr() == best_medianum ) {
- if ( cobj->satSolvable().repo().id() < best_prio ) {
+ if ( cobj->satSolvable().repository().id() < best_prio ) {
best_list.clear(); // new best
- } else if ( cobj->satSolvable().repo().id() == best_prio ) {
+ } else if ( cobj->satSolvable().repository().id() == best_prio ) {
XXX << "Add to best list " << *cit << endl;
best_list.push_back( *cit ); // same as best -> add
continue;
@@ -265,9 +264,9 @@
}
else // default: ORDER_BY_SOURCE
{
- if ( cobj->satSolvable().repo().id() < best_prio ) {
+ if ( cobj->satSolvable().repository().id() < best_prio ) {
best_list.clear(); // new best
- } else if ( cobj->satSolvable().repo().id() == best_prio ) {
+ } else if ( cobj->satSolvable().repository().id() == best_prio ) {
if ( cobj->mediaNr() < best_medianum ) {
best_list.clear(); // new best
} else if ( cobj->mediaNr() == best_medianum ) {
@@ -285,9 +284,9 @@
if ( best_list.empty() )
{
- XXX << "NEW BEST LIST [S" << cobj->satSolvable().repo().id() << ":" << cobj->mediaNr()
+ XXX << "NEW BEST LIST [S" << cobj->satSolvable().repository().id() << ":" << cobj->mediaNr()
<< "] (last [S" << best_prio << ":" << best_medianum << "])" << endl;
- best_prio = cobj->satSolvable().repo().id();
+ best_prio = cobj->satSolvable().repository().id();
best_medianum = cobj->mediaNr();
// first package or new best
XXX << "Add to best list " << *cit << endl;
Modified: trunk/libzypp/zypp/pool/PoolImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/pool/PoolImpl.cc?re…
==============================================================================
--- trunk/libzypp/zypp/pool/PoolImpl.cc (original)
+++ trunk/libzypp/zypp/pool/PoolImpl.cc Fri Feb 29 11:43:18 2008
@@ -17,7 +17,7 @@
#include "zypp/VendorAttr.h"
#include "zypp/sat/Pool.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
using std::endl;
Modified: trunk/libzypp/zypp/pool/PoolImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/pool/PoolImpl.h?rev…
==============================================================================
--- trunk/libzypp/zypp/pool/PoolImpl.h (original)
+++ trunk/libzypp/zypp/pool/PoolImpl.h Fri Feb 29 11:43:18 2008
@@ -179,7 +179,7 @@
sat::Pool pool( satpool() );
for_( it, pool.reposBegin(), pool.reposEnd() )
{
- _knownRepositoriesPtr->push_back( Repository( it->info() ) );
+ _knownRepositoriesPtr->push_back( *it );
}
}
return *_knownRepositoriesPtr;
Modified: trunk/libzypp/zypp/pool/PoolTraits.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/pool/PoolTraits.h?r…
==============================================================================
--- trunk/libzypp/zypp/pool/PoolTraits.h (original)
+++ trunk/libzypp/zypp/pool/PoolTraits.h Fri Feb 29 11:43:18 2008
@@ -29,7 +29,6 @@
{ /////////////////////////////////////////////////////////////////
class CapAndItem;
- class Repository;
///////////////////////////////////////////////////////////////////
namespace pool
@@ -144,11 +143,10 @@
/* list of known Repositories */
- typedef std::list<Repository> RepoContainerT;
+ typedef std::list<Repository> RepoContainerT;
typedef RepoContainerT::const_iterator repository_iterator;
-
-
+
// internal organization
typedef std::list<zypp::CapAndItem> CapItemContainerT; // (why,who) pairs
typedef std::map<std::string,CapItemContainerT> CapItemStoreT; // capability.index -> (why,who) pairs
Modified: trunk/libzypp/zypp/repo/DeltaCandidates.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/DeltaCandidate…
==============================================================================
--- trunk/libzypp/zypp/repo/DeltaCandidates.cc (original)
+++ trunk/libzypp/zypp/repo/DeltaCandidates.cc Fri Feb 29 11:43:18 2008
@@ -9,7 +9,7 @@
#include <iostream>
#include "zypp/base/Logger.h"
-
+#include "zypp/Repository.h"
#include "zypp/repo/DeltaCandidates.h"
using std::endl;
@@ -66,7 +66,8 @@
++it )
{
// all delta in repo
- std::list<PatchRpm> candidates_in_repo = (*it).patchRpms();
+ #warning patchRpms are not implemented
+ std::list<PatchRpm> candidates_in_repo; // = (*it).patchRpms();
for ( std::list<PatchRpm>::const_iterator dit = candidates_in_repo.begin();
dit != candidates_in_repo.end();
++dit )
@@ -93,7 +94,8 @@
++it )
{
// all delta in repo
- std::list<DeltaRpm> candidates_in_repo = (*it).deltaRpms();
+ #warning deltaRpms are not implemented
+ std::list<DeltaRpm> candidates_in_repo; // = (*it).deltaRpms();
for ( std::list<DeltaRpm>::const_iterator dit = candidates_in_repo.begin();
dit != candidates_in_repo.end();
++dit )
Modified: trunk/libzypp/zypp/repo/DeltaCandidates.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/DeltaCandidate…
==============================================================================
--- trunk/libzypp/zypp/repo/DeltaCandidates.h (original)
+++ trunk/libzypp/zypp/repo/DeltaCandidates.h Fri Feb 29 11:43:18 2008
@@ -15,7 +15,7 @@
#include "zypp/base/PtrTypes.h"
#include "zypp/base/Function.h"
-
+#include "zypp/repo/PackageDelta.h"
#include "zypp/Repository.h"
#include "zypp/Package.h"
@@ -67,13 +67,13 @@
///////////////////////////////////////////////////////////////////
/** \relates DeltaCandidates Convenient construction. */
- template<class RepositoryIter>
- inline DeltaCandidates makeDeltaCandidates( RepositoryIter begin_r, RepositoryIter end_r )
+ template<class RepoIter>
+ inline DeltaCandidates makeDeltaCandidates( RepoIter begin_r, RepoIter end_r )
{ return DeltaCandidates( std::list<Repository>( begin_r, end_r ) ); }
/** \relates DeltaCandidates Convenient construction. */
- template<class RepositoryContainer>
- inline DeltaCandidates makeDeltaCandidates( const RepositoryContainer & cont_r )
+ template<class RepoContainer>
+ inline DeltaCandidates makeDeltaCandidates( const RepoContainer & cont_r )
{ return makeDeltaCandidates( cont_r.begin(), cont_r.end() ); }
Modified: trunk/libzypp/zypp/repo/PackageProvider.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageProvide…
==============================================================================
--- trunk/libzypp/zypp/repo/PackageProvider.cc (original)
+++ trunk/libzypp/zypp/repo/PackageProvider.cc Fri Feb 29 11:43:18 2008
@@ -11,11 +11,10 @@
*/
#include <iostream>
#include <sstream>
+#include "zypp/repo/PackageDelta.h"
#include "zypp/base/Logger.h"
#include "zypp/base/Gettext.h"
#include "zypp/base/UserRequestException.h"
-
-#include "zypp/Repository.h"
#include "zypp/repo/PackageProvider.h"
#include "zypp/repo/RepoProvideFile.h"
#include "zypp/repo/Applydeltarpm.h"
@@ -23,7 +22,6 @@
#include "zypp/ZConfig.h"
#include "zypp/RepoInfo.h"
-#include "zypp/Repository.h"
#include "zypp/media/MediaManager.h"
using std::endl;
@@ -87,7 +85,7 @@
ManagedFile PackageProvider::providePackage() const
{
Url url;
- RepoInfo info = _package->repository().info();
+ RepoInfo info = _package->repoInfo();
// FIXME we only support the first url for now.
if ( info.baseUrlsEmpty() )
ZYPP_THROW(Exception("No url in repository."));
@@ -122,7 +120,7 @@
ManagedFile PackageProvider::doProvidePackage() const
{
Url url;
- RepoInfo info = _package->repository().info();
+ RepoInfo info = _package->repoInfo();
// FIXME we only support the first url for now.
if ( info.baseUrlsEmpty() )
ZYPP_THROW(Exception("No url in repository."));
@@ -201,7 +199,7 @@
ProvideFilePolicy policy;
policy.progressCB( bind( &PackageProvider::progressPackageDownload, this, _1 ) );
policy.failOnChecksumErrorCB( bind( &PackageProvider::failOnChecksumError, this ) );
- return _access.provideFile( _package->repository(), loc, policy );
+ return _access.provideFile( _package->repoInfo(), loc, policy );
}
ManagedFile PackageProvider::tryDelta( const DeltaRpm & delta_r ) const
@@ -220,7 +218,7 @@
{
ProvideFilePolicy policy;
policy.progressCB( bind( &PackageProvider::progressDeltaDownload, this, _1 ) );
- delta = _access.provideFile( _package->repository(), delta_r.location(), policy );
+ delta = _access.provideFile( _package->repoInfo(), delta_r.location(), policy );
}
catch ( const Exception & excpt )
{
@@ -271,7 +269,7 @@
{
ProvideFilePolicy policy;
policy.progressCB( bind( &PackageProvider::progressPatchDownload, this, _1 ) );
- patch = _access.provideFile( _package->repository(), patch_r.location(), policy );
+ patch = _access.provideFile( _package->repoInfo(), patch_r.location(), policy );
}
catch ( const Exception & excpt )
{
Modified: trunk/libzypp/zypp/repo/PackageProvider.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageProvide…
==============================================================================
--- trunk/libzypp/zypp/repo/PackageProvider.h (original)
+++ trunk/libzypp/zypp/repo/PackageProvider.h Fri Feb 29 11:43:18 2008
@@ -17,7 +17,6 @@
#include "zypp/base/NonCopyable.h"
#include "zypp/ZYppCallbacks.h"
-#include "zypp/Repository.h"
#include "zypp/Package.h"
#include "zypp/ManagedFile.h"
#include "zypp/repo/RepoProvideFile.h"
Modified: trunk/libzypp/zypp/repo/RepoProvideFile.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/RepoProvideFil…
==============================================================================
--- trunk/libzypp/zypp/repo/RepoProvideFile.cc (original)
+++ trunk/libzypp/zypp/repo/RepoProvideFile.cc Fri Feb 29 11:43:18 2008
@@ -51,7 +51,7 @@
{ /////////////////////////////////////////////////////////////////
/** Hack to extract progress information from source::DownloadFileReport.
- * We redirect the static report triggered from Repository::provideFile
+ * We redirect the static report triggered from RepoInfo::provideFile
* to feed the ProvideFilePolicy callbacks.
*/
struct DownloadFileReportHack : public callback::ReceiveReport<repo::RepoReport>
@@ -69,7 +69,7 @@
} // namespace
///////////////////////////////////////////////////////////////////
- ManagedFile provideFile( Repository repo_r,
+ ManagedFile provideFile( RepoInfo repo_r,
const OnMediaLocation & loc_r,
const ProvideFilePolicy & policy_r )
{
@@ -112,21 +112,20 @@
return media;
}
- void setVerifierForRepo( Repository repo, shared_ptr<MediaSetAccess> media )
+ void setVerifierForRepo( RepoInfo repo, shared_ptr<MediaSetAccess> media )
{
- RepoInfo info = repo.info();
// set a verifier if the repository has it
- Pathname mediafile = info.metadataPath() + "/media.1/media";
- if ( ! info.metadataPath().empty() )
+ Pathname mediafile = repo.metadataPath() + "/media.1/media";
+ if ( ! repo.metadataPath().empty() )
{
if ( PathInfo(mediafile).isExist() )
{
- std::map<shared_ptr<MediaSetAccess>, Repository>::const_iterator it;
+ std::map<shared_ptr<MediaSetAccess>, RepoInfo>::const_iterator it;
it = _verifier.find(media);
if ( it != _verifier.end() )
{
- if ( it->second == repo )
+ if ( it->second.alias() == repo.alias() )
{
// this media is already using this repo verifier
return;
@@ -144,7 +143,7 @@
getline(str, buffer);
unsigned media_nr = str::strtonum<unsigned>(buffer);
- MIL << "Repository '" << info.alias() << "' has " << media_nr << " medias"<< endl;
+ MIL << "Repository '" << repo.alias() << "' has " << media_nr << " medias"<< endl;
for ( unsigned i=1; i <= media_nr; ++i )
{
@@ -156,21 +155,21 @@
}
else
{
- ZYPP_THROW(RepoMetadataException(info));
+ ZYPP_THROW(RepoMetadataException(repo));
}
}
else
{
- WAR << "No media verifier for repo '" << info.alias() << "' media/media.1 does not exist in '" << info.metadataPath() << "'" << endl;
+ WAR << "No media verifier for repo '" << repo.alias() << "' media/media.1 does not exist in '" << repo.metadataPath() << "'" << endl;
}
}
else
{
- WAR << "'" << info.alias() << "' metadata path is empty. Can't set verifier. Probably this repository does not come from RepoManager." << endl;
+ WAR << "'" << repo.alias() << "' metadata path is empty. Can't set verifier. Probably this repository does not come from RepoManager." << endl;
}
}
- std::map<shared_ptr<MediaSetAccess>, Repository> _verifier;
+ std::map<shared_ptr<MediaSetAccess>, RepoInfo> _verifier;
std::map<Url, shared_ptr<MediaSetAccess> > _medias;
ProvideFilePolicy _defaultPolicy;
};
@@ -190,7 +189,7 @@
const ProvideFilePolicy & RepoMediaAccess::defaultPolicy() const
{ return _impl->_defaultPolicy; }
- ManagedFile RepoMediaAccess::provideFile( Repository repo_r,
+ ManagedFile RepoMediaAccess::provideFile( RepoInfo repo_r,
const OnMediaLocation & loc_r,
const ProvideFilePolicy & policy_r )
{
@@ -204,32 +203,31 @@
callback::TempConnect<repo::RepoReport> temp( dumb );
Url url;
- RepoInfo info = repo_r.info();
RepoException repo_excpt(str::form(_("Can't provide file '%s' from repository '%s'"),
loc_r.filename().c_str(),
- info.alias().c_str() ) );
+ repo_r.alias().c_str() ) );
- if ( info.baseUrlsEmpty() )
+ if ( repo_r.baseUrlsEmpty() )
{
repo_excpt.remember(RepoException(_("No url in repository.")));
ZYPP_THROW(repo_excpt);
}
Fetcher fetcher;
- fetcher.addCachePath( info.packagesPath() );
+ fetcher.addCachePath( repo_r.packagesPath() );
- MIL << "Added cache path " << info.packagesPath() << endl;
+ MIL << "Added cache path " << repo_r.packagesPath() << endl;
- for ( RepoInfo::urls_const_iterator it = info.baseUrlsBegin();
- it != info.baseUrlsEnd();
+ for ( RepoInfo::urls_const_iterator it = repo_r.baseUrlsBegin();
+ it != repo_r.baseUrlsEnd();
/* incremented in the loop */ )
{
url = *it;
++it;
try
{
- MIL << "Providing file of repo '" << info.alias()
+ MIL << "Providing file of repo '" << repo_r.alias()
<< "' from " << url << endl;
shared_ptr<MediaSetAccess> access = _impl->mediaAccessForUrl(url);
_impl->setVerifierForRepo(repo_r, access);
@@ -237,13 +235,13 @@
fetcher.enqueue( loc_r );
// FIXME: works for packages only
- fetcher.start( info.packagesPath(), *access );
+ fetcher.start( repo_r.packagesPath(), *access );
// reached if no exception has been thrown, so this is the correct file
- ManagedFile ret( info.packagesPath() + loc_r.filename() );
+ ManagedFile ret( repo_r.packagesPath() + loc_r.filename() );
std::string scheme( url.getScheme() );
- if ( !info.keepPackages() )
+ if ( !repo_r.keepPackages() )
{
ret.setDispose( filesystem::unlink );
}
Modified: trunk/libzypp/zypp/repo/RepoProvideFile.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/RepoProvideFil…
==============================================================================
--- trunk/libzypp/zypp/repo/RepoProvideFile.h (original)
+++ trunk/libzypp/zypp/repo/RepoProvideFile.h Fri Feb 29 11:43:18 2008
@@ -17,7 +17,7 @@
#include "zypp/base/PtrTypes.h"
#include "zypp/base/Function.h"
#include "zypp/base/Functional.h"
-#include "zypp/Repository.h"
+#include "zypp/RepoInfo.h"
#include "zypp/ManagedFile.h"
#include "zypp/OnMediaLocation.h"
#include "zypp/ProvideFilePolicy.h"
@@ -43,7 +43,7 @@
*
* \throws Exception
*/
- ManagedFile provideFile( Repository repo_r,
+ ManagedFile provideFile( RepoInfo repo_r,
const OnMediaLocation & loc_r,
const ProvideFilePolicy & policy_r = ProvideFilePolicy() );
@@ -73,12 +73,12 @@
* \throws Exception
* \todo Investigate why this needs a non-const Repository as arg.
*/
- ManagedFile provideFile( Repository repo_r,
+ ManagedFile provideFile( RepoInfo repo_r,
const OnMediaLocation & loc_r,
const ProvideFilePolicy & policy_r );
/** \overload Using the current default \ref ProvideFilePolicy. */
- ManagedFile provideFile( Repository repo_r, const OnMediaLocation & loc_r )
+ ManagedFile provideFile( RepoInfo repo_r, const OnMediaLocation & loc_r )
{ return provideFile( repo_r, loc_r, defaultPolicy() ); }
public:
Modified: trunk/libzypp/zypp/repo/ScriptProvider.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/ScriptProvider…
==============================================================================
--- trunk/libzypp/zypp/repo/ScriptProvider.cc (original)
+++ trunk/libzypp/zypp/repo/ScriptProvider.cc Fri Feb 29 11:43:18 2008
@@ -58,7 +58,7 @@
OnMediaLocation location( (script_r.*location_r)() );
if ( ! location.filename().empty() )
{
- ret = access_r.provideFile( script_r.repository(), location );
+ ret = access_r.provideFile( script_r.repoInfo(), location );
}
else
{
Modified: trunk/libzypp/zypp/repo/SrcPackageProvider.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/SrcPackageProv…
==============================================================================
--- trunk/libzypp/zypp/repo/SrcPackageProvider.cc (original)
+++ trunk/libzypp/zypp/repo/SrcPackageProvider.cc Fri Feb 29 11:43:18 2008
@@ -58,7 +58,7 @@
OnMediaLocation location( (script_r.*location_r)() );
if ( ! location.filename().empty() )
{
- ret = access_r.provideFile( script_r.repository(), location );
+ ret = access_r.provideFile( script_r.repoInfo(), location );
}
else
{
@@ -95,7 +95,7 @@
ManagedFile SrcPackageProvider::provideSrcPackage( const SrcPackage_constPtr & srcPackage_r ) const
{
- return _access.provideFile( srcPackage_r->repository(), srcPackage_r->location() );
+ return _access.provideFile( srcPackage_r->repoInfo(), srcPackage_r->location() );
}
/////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/sat/Pool.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Pool.cc?rev=895…
==============================================================================
--- trunk/libzypp/zypp/sat/Pool.cc (original)
+++ trunk/libzypp/zypp/sat/Pool.cc Fri Feb 29 11:43:18 2008
@@ -58,11 +58,11 @@
Pool::size_type Pool::reposSize() const
{ return myPool()->nrepos; }
- Pool::RepoIterator Pool::reposBegin() const
- { return RepoIterator( myPool()->repos ); }
+ Pool::RepositoryIterator Pool::reposBegin() const
+ { return RepositoryIterator( myPool()->repos ); }
- Pool::RepoIterator Pool::reposEnd() const
- { return RepoIterator( myPool()->repos+myPool()->nrepos ); }
+ Pool::RepositoryIterator Pool::reposEnd() const
+ { return RepositoryIterator( myPool()->repos+myPool()->nrepos ); }
bool Pool::solvablesEmpty() const
{
@@ -96,13 +96,13 @@
Pool::SolvableIterator Pool::solvablesEnd() const
{ return SolvableIterator(); }
- Repo Pool::reposInsert( const std::string & name_r )
+ Repository Pool::reposInsert( const std::string & name_r )
{
- Repo ret( reposFind( name_r ) );
+ Repository ret( reposFind( name_r ) );
if ( ret )
return ret;
- ret = Repo( myPool()._createRepo( name_r ) );
+ ret = Repository( myPool()._createRepo( name_r ) );
if ( name_r == systemRepoName() )
{
// autoprovide (dummy) RepoInfo
@@ -115,20 +115,20 @@
return ret;
}
- Repo Pool::reposFind( const std::string & name_r ) const
+ Repository Pool::reposFind( const std::string & name_r ) const
{
for_( it, reposBegin(), reposEnd() )
{
if ( name_r == it->name() )
return *it;
}
- return Repo();
+ return Repository();
}
- Repo Pool::addRepoSolv( const Pathname & file_r, const std::string & name_r )
+ Repository Pool::addRepoSolv( const Pathname & file_r, const std::string & name_r )
{
// Using a temporay repo! (The additional parenthesis are required.)
- AutoDispose<Repo> tmprepo( (Repo::EraseFromPool()) );
+ AutoDispose<Repository> tmprepo( (Repository::EraseFromPool()) );
*tmprepo = reposInsert( name_r );
tmprepo->addSolv( file_r );
@@ -137,12 +137,12 @@
return tmprepo;
}
- Repo Pool::addRepoSolv( const Pathname & file_r )
+ Repository Pool::addRepoSolv( const Pathname & file_r )
{ return addRepoSolv( file_r, file_r.basename() ); }
- Repo Pool::addRepoSolv( const Pathname & file_r, const RepoInfo & info_r )
+ Repository Pool::addRepoSolv( const Pathname & file_r, const RepoInfo & info_r )
{
- Repo ret( addRepoSolv( file_r, info_r.alias() ) );
+ Repository ret( addRepoSolv( file_r, info_r.alias() ) );
ret.setInfo( info_r );
return ret;
}
Modified: trunk/libzypp/zypp/sat/Pool.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Pool.h?rev=8959…
==============================================================================
--- trunk/libzypp/zypp/sat/Pool.h (original)
+++ trunk/libzypp/zypp/sat/Pool.h Fri Feb 29 11:43:18 2008
@@ -17,7 +17,7 @@
#include "zypp/Pathname.h"
#include "zypp/sat/detail/PoolMember.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
#include "zypp/sat/WhatProvides.h"
///////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@
{
public:
typedef detail::SolvableIterator SolvableIterator;
- typedef zypp::detail::RepoIterator RepoIterator;
+ typedef zypp::detail::RepositoryIterator RepositoryIterator;
typedef detail::size_type size_type;
public:
@@ -72,50 +72,50 @@
/** Number of repos in \ref Pool. */
size_type reposSize() const;
- /** Iterator to the first \ref Repo. */
- RepoIterator reposBegin() const;
+ /** Iterator to the first \ref Repository. */
+ RepositoryIterator reposBegin() const;
- /** Iterator behind the last \ref Repo. */
- RepoIterator reposEnd() const;
+ /** Iterator behind the last \ref Repository. */
+ RepositoryIterator reposEnd() const;
- /** Return a \ref Repo named \c name_r.
- * It a such a \ref Repo does not already exist
- * a new empty \ref Repo is created.
+ /** Return a \ref Repository named \c name_r.
+ * It a such a \ref Repository does not already exist
+ * a new empty \ref Repository is created.
*/
- Repo reposInsert( const std::string & name_r );
+ Repository reposInsert( const std::string & name_r );
- /** Find a \ref Repo named \c name_r.
- * Returns \ref norepo if there is no such \ref Repo.
+ /** Find a \ref Repository named \c name_r.
+ * Returns \ref norepository if there is no such \ref Repository.
*/
- Repo reposFind( const std::string & name_r ) const;
+ Repository reposFind( const std::string & name_r ) const;
- /** Remove a \ref Repo named \c name_r.
- * \see \ref Repo::eraseFromPool
+ /** Remove a \ref Repository named \c name_r.
+ * \see \ref Repository::eraseFromPool
*/
void reposErase( const std::string & name_r )
{ reposFind( name_r ).eraseFromPool(); }
public:
- /** Reserved system repo name \c @System. */
+ /** Reserved system repository name \c @System. */
static const std::string & systemRepoName();
- /** Return the system repo. */
- Repo systemRepo()
+ /** Return the system repository. */
+ Repository systemRepo()
{ return reposInsert( systemRepoName() ); }
public:
- /** Load \ref Solvables from a solv-file into a \ref Repo named \c name_r.
- * In case of an exception the \ref Repo is removed from the \ref Pool.
+ /** Load \ref Solvables from a solv-file into a \ref Repository named \c name_r.
+ * In case of an exception the \ref Repository is removed from the \ref Pool.
* \throws Exception if loading the solv-file fails.
- * \see \ref Repo::EraseFromPool
+ * \see \ref Repository::EraseFromPool
*/
- Repo addRepoSolv( const Pathname & file_r, const std::string & name_r );
- /** \overload Using the files basename as \ref Repo name. */
- Repo addRepoSolv( const Pathname & file_r );
+ Repository addRepoSolv( const Pathname & file_r, const std::string & name_r );
+ /** \overload Using the files basename as \ref Repository name. */
+ Repository addRepoSolv( const Pathname & file_r );
/** \overload Using the \ref RepoInfo::alias \ref Repo name.
* Additionally stores the \ref RepoInfo. \See \ref Prool::setInfo.
*/
- Repo addRepoSolv( const Pathname & file_r, const RepoInfo & info_r );
+ Repository addRepoSolv( const Pathname & file_r, const RepoInfo & info_r );
public:
/** Whether \ref Pool contains solvables. */
Modified: trunk/libzypp/zypp/sat/SATResolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/SATResolver.cc?…
==============================================================================
--- trunk/libzypp/zypp/sat/SATResolver.cc (original)
+++ trunk/libzypp/zypp/sat/SATResolver.cc Fri Feb 29 11:43:18 2008
@@ -432,7 +432,7 @@
p = _solv->decisionq.elements[i];
if (p < 0 || !sat::Solvable(p))
continue;
- if (sat::Solvable(p).repo().get() == _solv->installed)
+ if (sat::Solvable(p).repository().get() == _solv->installed)
continue;
PoolItem poolItem = _pool.find (sat::Solvable(p));
Modified: trunk/libzypp/zypp/sat/Solvable.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Solvable.cc?rev…
==============================================================================
--- trunk/libzypp/zypp/sat/Solvable.cc (original)
+++ trunk/libzypp/zypp/sat/Solvable.cc Fri Feb 29 11:43:18 2008
@@ -19,7 +19,7 @@
#include "zypp/sat/detail/PoolImpl.h"
#include "zypp/sat/Solvable.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
using std::endl;
@@ -58,14 +58,14 @@
return nosolvable;
}
- Repo Solvable::repo() const
+ Repository Solvable::repository() const
{
- NO_SOLVABLE_RETURN( Repo::norepo );
- return Repo( _solvable->repo );
+ NO_SOLVABLE_RETURN( Repository::noRepository );
+ return Repository( _solvable->repo );
}
bool Solvable::isSystem() const
- { return repo().isSystemRepo(); }
+ { return repository().isSystemRepo(); }
IdString Solvable::ident() const
{
@@ -477,7 +477,7 @@
return str << "(" << obj.id() << ")"
<< ( obj.isKind( ResKind::srcpackage ) ? "srcpackage:" : "" ) << obj.ident()
<< '-' << obj.edition() << '.' << obj.arch() << "("
- << obj.repo().name() << ")";
+ << obj.repository().name() << ")";
}
/******************************************************************
Modified: trunk/libzypp/zypp/sat/Solvable.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Solvable.h?rev=…
==============================================================================
--- trunk/libzypp/zypp/sat/Solvable.h (original)
+++ trunk/libzypp/zypp/sat/Solvable.h Fri Feb 29 11:43:18 2008
@@ -18,7 +18,6 @@
#include "zypp/sat/detail/PoolMember.h"
#include "zypp/sat/SolvAttr.h"
-
#include "zypp/ResTraits.h"
#include "zypp/IdString.h"
#include "zypp/Edition.h"
@@ -76,7 +75,7 @@
bool isSystem() const;
/** The \ref Repository this \ref Solvable belongs to. */
- Repo repo() const;
+ Repository repository() const;
public:
Modified: trunk/libzypp/zypp/sat/detail/PoolMember.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/detail/PoolMemb…
==============================================================================
--- trunk/libzypp/zypp/sat/detail/PoolMember.h (original)
+++ trunk/libzypp/zypp/sat/detail/PoolMember.h Fri Feb 29 11:43:18 2008
@@ -40,20 +40,22 @@
class IdString;
class Capability;
class Capabilities;
- class Repo;
+ class Repository;
+ class RepoInfo;
+
///////////////////////////////////////////////////////////////////
namespace detail
{
class RepoIterator;
- class ByRepo;
+ class ByRepository;
}
///////////////////////////////////////////////////////////////////
namespace sat
{ /////////////////////////////////////////////////////////////////
- class Solvable;
class Pool;
+ class Solvable;
///////////////////////////////////////////////////////////////////
namespace detail
Modified: trunk/libzypp/zypp/solver/detail/Helper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Helpe…
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Helper.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Helper.cc Fri Feb 29 11:43:18 2008
@@ -32,6 +32,7 @@
#include "zypp/ResPool.h"
#include "zypp/ResFilters.h"
#include "zypp/CapFilters.h"
+#include "zypp/RepoInfo.h"
using namespace std;
@@ -273,14 +274,12 @@
if (item->arch() != "") {
os << '.' << item->arch();
}
- Repository s = item->repository();
- if (s) {
- string alias = s.info().alias();
- if (!alias.empty()
- && alias != "@system")
- {
- os << '[' << s.info().alias() << ']';
- }
+
+ string alias = item->repoInfo().alias();
+ if (!alias.empty()
+ && alias != "@system")
+ {
+ os << '[' << alias << ']';
}
}
return os.str();
Modified: trunk/libzypp/zypp/solver/detail/Testcase.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Testc…
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Testcase.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Testcase.cc Fri Feb 29 11:43:18 2008
@@ -284,7 +284,7 @@
system.addResolvable (*it);
} else {
// repo channels
- Repo repo = it->resolvable()->satSolvable().repo();
+ Repository repo = it->resolvable()->satSolvable().repository();
if (repoTable.find (repo) == repoTable.end()) {
repoTable[repo] = new HelixResolvable(dumpPath + "/"
+ str::numstring((long)repo.id())
@@ -357,7 +357,7 @@
system->addResolvable (*it);
} else {
// repo channels
- Repo repo = it->resolvable()->satSolvable().repo();
+ Repository repo = it->resolvable()->satSolvable().repository();
if (dumpPool) {
if (repoTable.find (repo) == repoTable.end()) {
repoTable[repo] = new HelixResolvable(dumpPath + "/"
Modified: trunk/libzypp/zypp/solver/detail/Testcase.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Testc…
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Testcase.h (original)
+++ trunk/libzypp/zypp/solver/detail/Testcase.h Fri Feb 29 11:43:18 2008
@@ -22,7 +22,7 @@
#include "zypp/Capabilities.h"
#include "zypp/ResPool.h"
#include "zypp/base/GzStream.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
@@ -82,7 +82,7 @@
};
DEFINE_PTR_TYPE(HelixResolvable);
-typedef std::map<Repo, HelixResolvable_Ptr> RepositoryTable;
+typedef std::map<Repository, HelixResolvable_Ptr> RepositoryTable;
///////////////////////////////////////////////////////////////////
//
Modified: trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/CommitPackag…
==============================================================================
--- trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc (original)
+++ trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.cc Fri Feb 29 11:43:18 2008
@@ -14,6 +14,7 @@
#include "zypp/base/Logger.h"
#include "zypp/base/Exception.h"
#include "zypp/PathInfo.h"
+#include "zypp/RepoInfo.h"
#include "zypp/target/CommitPackageCacheReadAhead.h"
using std::endl;
@@ -33,8 +34,8 @@
std::ostream & operator<<( std::ostream & str, const IMediaKey & obj )
{
- return str << "[S" << obj._repository.numericId() << ":" << obj._mediaNr << "]"
- << " " << obj._repository.info().alias();
+ return str << "[S" << obj._repo.id() << ":" << obj._mediaNr << "]"
+ << " " << obj._repo.info().alias();
}
///////////////////////////////////////////////////////////////////
@@ -66,9 +67,9 @@
{
if ( pi->mediaNr() == 0 ) // no media access at all
return false;
- if ( pi->repository().info().baseUrlsEmpty() )
+ if ( pi->repoInfo().baseUrlsEmpty() )
return false; // no Url - should actually not happen
- std::string scheme( pi->repository().info().baseUrlsBegin()->getScheme() );
+ std::string scheme( pi->repoInfo().baseUrlsBegin()->getScheme() );
return ( scheme == "dvd" || scheme == "cd" );
}
@@ -160,7 +161,7 @@
// copy it to the cachedir
std::string destName( str::form( "S%lu_%u_%s",
- it->first->repository().numericId(),
+ it->first->repository().id(),
it->first->mediaNr(),
fromSource.value().basename().c_str() ) );
Modified: trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/CommitPackag…
==============================================================================
--- trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.h (original)
+++ trunk/libzypp/zypp/target/CommitPackageCacheReadAhead.h Fri Feb 29 11:43:18 2008
@@ -17,7 +17,6 @@
#include "zypp/base/Logger.h"
#include "zypp/base/Exception.h"
#include "zypp/base/DefaultIntegral.h"
-
#include "zypp/Repository.h"
#include "zypp/TmpPath.h"
#include "zypp/target/CommitPackageCacheImpl.h"
@@ -41,29 +40,29 @@
explicit
IMediaKey( const ResObject::constPtr & obj_r )
- : _repository( obj_r->repository() )
+ : _repo( obj_r->repository() )
, _mediaNr( obj_r->mediaNr() )
{}
IMediaKey( const Repository & repo, unsigned mediaNr_r )
- : _repository( repo )
+ : _repo( repo )
, _mediaNr( mediaNr_r )
{}
bool operator==( const IMediaKey & rhs ) const
- { return( _repository == rhs._repository && _mediaNr == rhs._mediaNr ); }
+ { return( _repo == rhs._repo && _mediaNr == rhs._mediaNr ); }
bool operator!=( const IMediaKey & rhs ) const
{ return ! operator==( rhs ); }
bool operator<( const IMediaKey & rhs ) const
{
- return( _repository.numericId() < rhs._repository.numericId()
- || ( _repository.numericId() == rhs._repository.numericId()
+ return( _repo.id() < rhs._repo.id()
+ || ( _repo.id() == rhs._repo.id()
&& _mediaNr < rhs._mediaNr ) );
}
- Repository _repository;
+ Repository _repo;
DefaultIntegral<unsigned,0> _mediaNr;
};
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/target/TargetImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/TargetImpl.c…
==============================================================================
--- trunk/libzypp/zypp/target/TargetImpl.cc (original)
+++ trunk/libzypp/zypp/target/TargetImpl.cc Fri Feb 29 11:43:18 2008
@@ -29,7 +29,7 @@
#include "zypp/TmpPath.h"
#include "zypp/RepoStatus.h"
#include "zypp/ExternalProgram.h"
-#include "zypp/Repo.h"
+#include "zypp/Repository.h"
#include "zypp/CapMatchHelper.h"
#include "zypp/ResFilters.h"
@@ -380,7 +380,7 @@
//now add the repos to the pool
MIL << "adding " << rpmsolv << " to pool(" << sat::Pool::instance().systemRepoName() << ")";
- Repo system = sat::Pool::instance().systemRepo();
+ Repository system = sat::Pool::instance().systemRepo();
system.addSolv(rpmsolv);
MIL << "Target loaded: " << system.solvablesSize() << " resolvables" << endl;
Modified: trunk/libzypp/zypp/target/rpm/RpmDb.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/target/rpm/RpmDb.cc…
==============================================================================
--- trunk/libzypp/zypp/target/rpm/RpmDb.cc (original)
+++ trunk/libzypp/zypp/target/rpm/RpmDb.cc Fri Feb 29 11:43:18 2008
@@ -1241,7 +1241,8 @@
//
Package::Ptr RpmDb::makePackageFromHeader( const RpmHeader::constPtr header,
set<string> * filerequires,
- const Pathname & location, Repository repo )
+ const Pathname & location,
+ Repository repo )
{
if ( ! header )
return 0;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r8958 - in /trunk/zypper/src/output: OutXML.cc xmlout.rnc
by jkupec@svn.opensuse.org 29 Feb '08
by jkupec@svn.opensuse.org 29 Feb '08
29 Feb '08
Author: jkupec
Date: Fri Feb 29 11:32:14 2008
New Revision: 8958
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8958&view=rev
Log:
- prompt rnc updated
Modified:
trunk/zypper/src/output/OutXML.cc
trunk/zypper/src/output/xmlout.rnc
Modified: trunk/zypper/src/output/OutXML.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/output/OutXML.cc?rev=…
==============================================================================
--- trunk/zypper/src/output/OutXML.cc (original)
+++ trunk/zypper/src/output/OutXML.cc Fri Feb 29 11:32:14 2008
@@ -199,7 +199,7 @@
ansit != answers.end(); ++ansit)
{
string answer = *ansit;
- cout << "<answer";
+ cout << "<option";
//if (is_default) // TODO
// cout << " default=\"1\"";
cout << " value=\"" << xml_encode(answer) << "\"";
Modified: trunk/zypper/src/output/xmlout.rnc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/output/xmlout.rnc?rev…
==============================================================================
--- trunk/zypper/src/output/xmlout.rnc (original)
+++ trunk/zypper/src/output/xmlout.rnc Fri Feb 29 11:32:14 2008
@@ -13,9 +13,11 @@
update-status-element* |
install-summary-element* |
repo-list-element? |
- solver-problem-element* |
list-element? |
- info-element?
+ info-element? |
+
+ # random text can appear between tags - this text should be ignored
+ text
)+
}
@@ -60,7 +62,11 @@
prompt-element =
element prompt {
attribute id { xsd:integer },
- text
+ text,
+ element option {
+ attribute default { xsd:boolean }?,
+ attribute value { xsd:string }
+ }*
}
update-status-element =
@@ -114,9 +120,6 @@
}*
}
-solver-problem-element =
- element solver-problem { empty } # TODO
-
list-element =
element list { empty } # TODO
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
29 Feb '08
Author: coolo
Date: Fri Feb 29 10:26:36 2008
New Revision: 8957
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8957&view=rev
Log:
not sure what tool Duncan uses
Modified:
trunk/libzypp/package/libzypp.changes
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?…
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Fri Feb 29 10:26:36 2008
@@ -5,8 +5,8 @@
(forbidden) (port from SP2)
- MediaException messages marked for translation
-Wed Feb 27 10:31:24 CET 2008 - dmacvicar(a)suse.de
-------------------------------------------------------------------
+Wed Feb 27 10:31:24 CET 2008 - dmacvicar(a)suse.de
- make sure we have target cache on target initialize
- version 4.3.0
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
28 Feb '08
Author: jkupec
Date: Thu Feb 28 23:13:22 2008
New Revision: 8956
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8956&view=rev
Log:
changes
Modified:
trunk/zypper/package/zypper.changes
Modified: trunk/zypper/package/zypper.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/package/zypper.changes?re…
==============================================================================
--- trunk/zypper/package/zypper.changes (original)
+++ trunk/zypper/package/zypper.changes Thu Feb 28 23:13:22 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Feb 28 19:40:23 CET 2008 - jkupec(a)suse.cz
+
+- fixed solver solution detail text indentation (bnc #358871)
+- better solver prompt text (bnc #365236)
+
+-------------------------------------------------------------------
Sat Feb 23 17:27:05 CET 2008 - dmacvicar(a)suse.de
- default autorefresh to disabled like every other package
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
[zypp-commit] r8955 - in /trunk/zypper/src: output/OutNormal.cc output/OutXML.cc zypper-callbacks.cc zypper-misc.cc
by jkupec@svn.opensuse.org 28 Feb '08
by jkupec@svn.opensuse.org 28 Feb '08
28 Feb '08
Author: jkupec
Date: Thu Feb 28 22:51:25 2008
New Revision: 8955
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8955&view=rev
Log:
- towards even better prompts
- comming up next: translatable answers, prompt help, default answers on enter
Modified:
trunk/zypper/src/output/OutNormal.cc
trunk/zypper/src/output/OutXML.cc
trunk/zypper/src/zypper-callbacks.cc
trunk/zypper/src/zypper-misc.cc
Modified: trunk/zypper/src/output/OutNormal.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/output/OutNormal.cc?r…
==============================================================================
--- trunk/zypper/src/output/OutNormal.cc (original)
+++ trunk/zypper/src/output/OutNormal.cc Thu Feb 28 22:51:25 2008
@@ -186,8 +186,14 @@
const string & prompt,
const string & answer_hint)
{
- cout << CLEARLN << prompt;
- if (!answer_hint.empty())
- cout << " " << answer_hint;
- cout << ": " << std::flush;
+ /**
+ vector<string> answers;
+ zypp::str::split(answer_hint, back_inserter(answers), "/");
+ for (vector<string>::const_iterator ansit = answers.begin();
+ ansit != answers.end(); ++ansit)
+ {
+ }
+ */
+
+ cout << CLEARLN << prompt << " [" << answer_hint << "]: " << std::flush;
}
Modified: trunk/zypper/src/output/OutXML.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/output/OutXML.cc?rev=…
==============================================================================
--- trunk/zypper/src/output/OutXML.cc (original)
+++ trunk/zypper/src/output/OutXML.cc Thu Feb 28 22:51:25 2008
@@ -1,5 +1,8 @@
#include <iostream>
#include <sstream>
+#include <vector>
+
+#include "zypp/base/String.h"
#include "OutXML.h"
#include "../zypper-utils.h"
@@ -8,6 +11,7 @@
using std::endl;
using std::string;
using std::ostringstream;
+using std::vector;
OutXML::OutXML(Verbosity verbosity) : Out(TYPE_XML, verbosity)
{
@@ -184,8 +188,22 @@
void OutXML::prompt(PromptId id,
const string & prompt,
- const string & answer_hint) // hint ignored for now, maybe an enumeration will be here in the future
+ const string & answer_hint)
{
- cout << "<prompt id=\"" << id << "\">" << xml_encode(prompt)
- << "</prompt>" << endl;
+ cout << "<prompt id=\"" << id << "\">" << endl;
+ cout << xml_encode(prompt);
+
+ vector<string> answers;
+ zypp::str::split(answer_hint, back_inserter(answers), "/");
+ for (vector<string>::const_iterator ansit = answers.begin();
+ ansit != answers.end(); ++ansit)
+ {
+ string answer = *ansit;
+ cout << "<answer";
+ //if (is_default) // TODO
+ // cout << " default=\"1\"";
+ cout << " value=\"" << xml_encode(answer) << "\"";
+ cout << "/>" << endl;
+ }
+ cout << "</prompt>" << endl;
}
Modified: trunk/zypper/src/zypper-callbacks.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-callbacks.cc?r…
==============================================================================
--- trunk/zypper/src/zypper-callbacks.cc (original)
+++ trunk/zypper/src/zypper-callbacks.cc Thu Feb 28 22:51:25 2008
@@ -17,7 +17,13 @@
//Action ...
int read_action_ari (PromptId pid, int default_action) {
Out & out = Zypper::instance()->out();
- out.prompt(pid, _("Abort, retry, ignore?"), "[a/r/i]"); //! \todo translation?
+ // translators: "a/r/i" are the answers to the
+ // "Abort, retry, ignore?" prompt
+ // Translate the letters to whatever is suitable for your language.
+ // the anserws must be separated by slash characters '/' and must
+ // correspond to abort/retry/ignore in that order.
+ // The answers should be lower case letters.
+ out.prompt(pid, _("Abort, retry, ignore?"), _("a/r/i"));
// choose abort if no default has been specified
if (default_action == -1) {
@@ -52,9 +58,10 @@
else if (c == 'i')
return 2;
// translators: don't translate the letters
- out.prompt(pid,
- boost::str(format(_("Invalid answer '%s'.")) % c),
- _("Choose letter 'a', 'r', or 'i'"));
+ ostringstream s;
+ s << format(_("Invalid answer '%s'.")) % c << " "
+ << _("Choose letter 'a', 'r', or 'i'");
+ out.prompt(pid, s.str(), _("a/r/i")); //! \todo remove this, handle invalid answers within the first prompt()
DBG << "invalid answer" << endl;
}
@@ -68,9 +75,9 @@
const GlobalOptions & gopts = Zypper::instance()->globalOpts();
Out & out = Zypper::instance()->out();
- ostringstream s;
- s << "[" << _("yes") << "/" << _("no") << "]";
- out.prompt(pid, question, s.str());
+ string yn = string(_("yes")) + "/" + _("no");
+
+ out.prompt(pid, question, yn);
// non-interactive mode: print the answer for convenience (only for normal
// output) and return default
@@ -89,13 +96,15 @@
while (stm.good() && rpmatch(c.c_str()) == -1)
{
if (been_here_before)
- out.prompt(pid,
- boost::str(format(_("Invalid answer '%s'.")) % c),
- boost::str(format(
- // TranslatorExplanation don't translate the 'y' and 'n', they can always be used as answers.
- // The second and the third %s is the translated 'yes' and 'no' string (lowercase).
- _("Enter 'y' for '%s' or 'n' for '%s' if nothing else works for you"))
- % _("yes") % _("no")));
+ {
+ ostringstream s;
+ s << format(_("Invalid answer '%s'.")) % c << " " << format(
+ // TranslatorExplanation don't translate the 'y' and 'n', they can always be used as answers.
+ // The second and the third %s is the translated 'yes' and 'no' string (lowercase).
+ _("Enter 'y' for '%s' or 'n' for '%s' if nothing else works for you"))
+ % _("yes") % _("no");
+ out.prompt(pid, s.str(), yn); //! \todo remove this, handle invalid answers within the first prompt()
+ }
c = zypp::str::getline (stm, zypp::str::TRIM);
been_here_before = true;
}
Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=89…
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Thu Feb 28 22:51:25 2008
@@ -490,8 +490,13 @@
solutions.size());
zypper.out().prompt(PROMPT_DEP_RESOLVE, stm.str(),
- // TranslatorExplanation: dependency problem solution input prompt
- _("[#/s/r/c]"));
+ // translators: answers for dependency problem solution input prompt:
+ // "Choose from above solutions by number or skip, retry or cancel"
+ // Translate the letters to whatever is suitable for your language.
+ // The anserws must be separated by slash characters '/' and must
+ // correspond to number/skip/retry/cancel in that order.
+ // The answers should be lower case letters.
+ _("#/s/r/c"));
string reply_s = str::getline (cin, zypp::str::TRIM);
if (! cin.good()) {
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0
28 Feb '08
Author: jkupec
Date: Thu Feb 28 21:12:12 2008
New Revision: 8954
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8954&view=rev
Log:
- do not show this to machines
Modified:
trunk/zypper/src/zypper-misc.cc
Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=89…
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Thu Feb 28 21:12:12 2008
@@ -483,10 +483,11 @@
return false;
}
- stm << _PL(
- "Choose the above solution using '1' or skip, retry or cancel",
- "Choose from above solutions by number or skip, retry or cancel",
- solutions.size());
+ if (!zypper.globalOpts().machine_readable)
+ stm << _PL(
+ "Choose the above solution using '1' or skip, retry or cancel",
+ "Choose from above solutions by number or skip, retry or cancel",
+ solutions.size());
zypper.out().prompt(PROMPT_DEP_RESOLVE, stm.str(),
// TranslatorExplanation: dependency problem solution input prompt
--
To unsubscribe, e-mail: zypp-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: zypp-commit+help(a)opensuse.org
1
0