[zypp-commit] r9369 - /trunk/libzypp-testsuite/solver/src/deptestomatic.cc
Author: matz Date: Fri Apr 4 00:47:16 2008 New Revision: 9369 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9369&view=rev Log: Fix testcases with URLs as sources. 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/deptestomatic.cc?rev=9369&r1=9368&r2=9369&view=diff ============================================================================== --- trunk/libzypp-testsuite/solver/src/deptestomatic.cc (original) +++ trunk/libzypp-testsuite/solver/src/deptestomatic.cc Fri Apr 4 00:47:16 2008 @@ -549,12 +549,11 @@ return; } -static int +static bool load_source (const string & alias, const string & filename, const string & type, bool system_packages) { Pathname pathname = globalPath + filename; MIL << "'" << pathname << "'" << endl; - int count = 0; Repository repo; @@ -580,7 +579,7 @@ catch ( Exception & excpt_r ) { ZYPP_CAUGHT (excpt_r); cout << "Couldn't load packages from Url '" << filename << "'" << endl; - return -1; + return false; } } else { @@ -616,24 +615,23 @@ if (!fpHelix) { cout << "Couldn't load packages from XML file '" << filename << "'" << endl; - return -1; + return false; } repo_add_helix(intSatRepo, fpHelix); - count = satRepo.solvablesSize(); cout << "Loaded " << satRepo.solvablesSize() << " resolvables from " << (filename.empty()?pathname.asString():filename) << "." << endl; pclose( fpHelix ); } catch ( Exception & excpt_r ) { ZYPP_CAUGHT (excpt_r); cout << "Couldn't load packages from XML file '" << filename << "'" << endl; - return -1; + return false; } } if(set_licence) set_licence_Pool(); - return count; + return true; } static bool done_setup = false; @@ -677,7 +675,7 @@ } else if (node->equals ("system")) { string file = node->getProp ("file"); - if (load_source ("@System", file, "helix", true) <= 0) { + if (!load_source ("@System", file, "helix", true)) { cerr << "Can't setup 'system'" << endl; exit( 1 ); } @@ -692,7 +690,7 @@ string name = node->getProp ("name"); string file = node->getProp ("file"); string type = node->getProp ("type"); - if (load_source (name, file, type, false) <= 0) { + if (!load_source (name, file, type, false)) { cerr << "Can't setup 'channel'" << endl; exit( 1 ); } @@ -701,7 +699,7 @@ string url = node->getProp ("url"); string alias = node->getProp ("name"); - if (load_source( alias, url, "url", false ) <= 0) { + if (!load_source( alias, url, "url", false )) { cerr << "Can't setup 'source'" << endl; exit( 1 ); } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
matz@svn.opensuse.org