Mailinglist Archive: zypp-commit (38 mails)

< Previous Next >
[zypp-commit] <libzypp-testsuite> master : Parse and process <upgradeRepo name=REPOALIAS/>
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Tue, 4 Aug 2009 15:22:45 +0200
  • Message-id: <E1MYJyq-00079i-Mj@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 623671dc81d2e39b210733667b3ca446161b6dc6
Author: Michael Andres <ma@xxxxxxx>
Date: Tue Aug 4 15:22:45 2009 +0200

Parse and process <upgradeRepo name=REPOALIAS/>
---
VERSION | 2 +-
package/libzypp-testsuite-tools.changes | 6 ++++++
solver/src/deptestomatic.cc | 25 +++++++++++++++++++++----
3 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/VERSION b/VERSION
index 56d9bb1..985ee41 100644
--- a/VERSION
+++ b/VERSION
@@ -49,5 +49,5 @@ dnl ==================================================
m4_define([LIBZYPPTESTSUITE_MINOR], [2])
m4_define([LIBZYPPTESTSUITE_COMPATMINOR], [2])
dnl ==================================================
-m4_define([LIBZYPPTESTSUITE_PATCH], [9])
+m4_define([LIBZYPPTESTSUITE_PATCH], [10])
dnl ==================================================
diff --git a/package/libzypp-testsuite-tools.changes
b/package/libzypp-testsuite-tools.changes
index 9d56bad..7da7be0 100644
--- a/package/libzypp-testsuite-tools.changes
+++ b/package/libzypp-testsuite-tools.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Aug 4 15:16:26 CEST 2009 - ma@xxxxxxx
+
+- Parse and process <upgradeRepo name=REPOALIAS/>
+- version 4.2.10
+
+-------------------------------------------------------------------
Wed Jul 8 14:16:33 CEST 2009 - ma@xxxxxxx

- Remove references to deprecated UpgradeStatistics.
diff --git a/solver/src/deptestomatic.cc b/solver/src/deptestomatic.cc
index 1b6e545..da3535b 100644
--- a/solver/src/deptestomatic.cc
+++ b/solver/src/deptestomatic.cc
@@ -203,7 +203,7 @@ List of known tags. See
http://en.opensuse.org/Libzypp/Testsuite_solver for deta
addRequire arch availablelocales channel createTestcase current distupgrade
force-install forceResolve \n\
graphic hardwareInfo ignorealreadyrecommended install instorder keep locale
lock mediaid mediaorder \n\
onlyRequires reportproblems setlicencebit showpool showselectable source
subscribe system systemCheck \n\
- takesolution uninstall update validate verify whatprovides" << endl;
+ takesolution uninstall update upgradeRepo validate verify whatprovides" <<
endl;


return str;
@@ -668,7 +668,7 @@ load_source (const string & alias, const string & filename,
const string & type,
nrepo.addBaseUrl ( pathname.asUrl() );

satRepo.setInfo (nrepo);
- satRepo.addHelix( filename );
+ satRepo.addHelix( pathname );
cout << "Loaded " << satRepo.solvablesSize() << " resolvables from "
<< (filename.empty()?pathname.asString():filename) << "." << endl;
}
catch ( Exception & excpt_r ) {
@@ -850,6 +850,8 @@ parse_xml_trial (XmlNode_Ptr node, ResPool & pool)
exit (0);
}

+ sat::Pool satpool( sat::Pool::instance() );
+
zypp::solver::detail::Resolver_Ptr resolver = new
zypp::solver::detail::Resolver( pool );
resolver->setForceResolve( forceResolve );
resolver->setIgnoreAlreadyRecommended( ignorealreadyrecommended );
@@ -984,15 +986,29 @@ parse_xml_trial (XmlNode_Ptr node, ResPool & pool)
} else if (node->equals ("addConflict")) {
vector<string> names;
str::split( node->getProp ("name"), back_inserter(names), "," );
- for (unsigned i=0; i < names.size(); i++) {
+ for (unsigned i=0; i < names.size(); ++i) {
resolver->addExtraConflict(Capability (names[i], string2kind
(node->getProp ("kind"))));
}
} else if (node->equals ("addRequire")) {
vector<string> names;
str::split( node->getProp ("name"), back_inserter(names), "," );
- for (unsigned i=0; i < names.size(); i++) {
+ for (unsigned i=0; i < names.size(); ++i) {
resolver->addExtraRequire(Capability (names[i], string2kind
(node->getProp ("kind"))));
}
+ } else if (node->equals ("upgradeRepo")) {
+ vector<string> names;
+ str::split( node->getProp ("name"), back_inserter(names), "," );
+ for (unsigned i=0; i < names.size(); ++i) {
+ Repository r = satpool.reposFind( names[i] );
+ if ( ! r )
+ {
+ ERR << "upgradeRepo '" << r << "' not found." << endl;
+ cerr << "upgradeRepo '" << r << "' not found." << endl;
+ exit( 1 );
+ }
+ else
+ resolver->addUpgradeRepo( r );
+ }
} else if (node->equals ("reportproblems")) {
bool success;
if (!solverQueue.empty())
@@ -1350,6 +1366,7 @@ parse_xml_trial (XmlNode_Ptr node, ResPool & pool)
testcase.createTestcase (*resolver);

} else {
+ ERR << "Unknown tag '" << node->name() << "' in trial" << endl;
cerr << "Unknown tag '" << node->name() << "' in trial" << endl;
}

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages