Author: jkupec Date: Tue May 20 19:06:02 2008 New Revision: 10169 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10169&view=rev Log: - delta test: version check added Modified: trunk/libzypp/tests/zypp/Deltarpm_test.cc trunk/libzypp/zypp/repo/DeltaCandidates.cc Modified: trunk/libzypp/tests/zypp/Deltarpm_test.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/zypp/Deltarpm_test.cc?rev=10169&r1=10168&r2=10169&view=diff ============================================================================== --- trunk/libzypp/tests/zypp/Deltarpm_test.cc (original) +++ trunk/libzypp/tests/zypp/Deltarpm_test.cc Tue May 20 19:06:02 2008 @@ -55,12 +55,21 @@ std::listpackagedelta::DeltaRpm deltas = dc.deltaRpms(0); for_ (it,deltas.begin(),deltas.end()) { - BOOST_CHECK(it->name()=="libzypp"); -// BOOST_CHECK((it->edition()==Edition("0:4.21.3-2"))); -// BOOST_CHECK(it->arch()=="i386"); - BOOST_CHECK((it->baseversion().edition() == Edition("4.21.3-1")) - ||(it->baseversion().edition() == Edition("4.21.2-3"))); - cout << it->name() << " - " << it->edition() << " - " << it->arch() << " base: " << it->baseversion().edition() << endl; + BOOST_CHECK(it->name() == "libzypp"); + BOOST_CHECK(it->edition() == Edition("4.21.3-2")); + BOOST_CHECK(it->arch() == "i386"); + BOOST_CHECK(it->baseversion().edition().match(Edition("4.21.3-1")) + ||it->baseversion().edition().match(Edition("4.21.2-3"))); + + cout << it->name() << " - " << it->edition() << " - " << it->arch() + << " base: " << it->baseversion().edition() << endl; + + cout << (it->edition() == "4.21.3-2") << endl; // fine + cout << (it->edition() == Edition("4.21.3-2")) << endl; // fine + cout << (it->edition().match(Edition("4.21.3-2"))) << endl; //! \todo FIXME says no + cout << (it->edition().match("4.21.3-2")) << endl; //! \todo FIXME says no } + + //! \todo FIXME Edition("0:4.21.3-2") != Edition("4.21.3-2") (not even does Edition("0:4.21.3-2").match(Edition("4.21.3-2")) rm.cleanCache(updates); } Modified: trunk/libzypp/zypp/repo/DeltaCandidates.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/DeltaCandidates.cc?rev=10169&r1=10168&r2=10169&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/DeltaCandidates.cc (original) +++ trunk/libzypp/zypp/repo/DeltaCandidates.cc Tue May 20 19:06:02 2008 @@ -99,6 +99,7 @@ for ( std::list<Repository>::const_iterator it = _pimpl->repos.begin(); it != _pimpl->repos.end(); ++it ) { + DBG << "package: " << package << endl; for (int i = 0; i < it->get()->nextra; ++i) { ::Dataiterator di; @@ -111,14 +112,13 @@ while (::dataiterator_step(&di)) { DeltaRpm delta(*it, di.solvid); - DBG << "got delta: " << delta << endl; - DBG << "package: " << package << endl; + DBG << "checking delta: " << delta << endl; if ( ! package || ( package->name() == delta.name() && package->edition() == delta.edition() && package->arch() == delta.arch() ) ) { - DBG << "got delta candidate: " << delta << endl; + DBG << "got delta candidate" << endl; candidates.push_back( delta ); } } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org