Author: jkupec Date: Mon May 19 21:10:33 2008 New Revision: 10150 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10150&view=rev Log: - deltarpms now work - repository is now associated with each delta individually, a delta from any repo can be applied Modified: trunk/libzypp/devel/devel.jkupec/deltarpm.cc trunk/libzypp/zypp/repo/DeltaCandidates.cc trunk/libzypp/zypp/repo/PackageDelta.cc trunk/libzypp/zypp/repo/PackageDelta.h trunk/libzypp/zypp/repo/PackageProvider.cc Modified: trunk/libzypp/devel/devel.jkupec/deltarpm.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.jkupec/deltarpm.cc?rev=10150&r1=10149&r2=10150&view=diff ============================================================================== --- trunk/libzypp/devel/devel.jkupec/deltarpm.cc (original) +++ trunk/libzypp/devel/devel.jkupec/deltarpm.cc Mon May 19 21:10:33 2008 @@ -90,20 +90,16 @@ cout << IdString(di.kv.id); break; } - /* case DELTA_PACKAGE_EVR: { - if (di.key->type == REPOKEY_TYPE_STR) - cout << di.kv.str; - else - cout << "..."; + cout << IdString(di.kv.id); break; } case DELTA_PACKAGE_ARCH: { + cout << IdString(di.kv.id); break; } - */ case DELTA_LOCATION_DIR: { cout << IdString(di.kv.id); Modified: trunk/libzypp/zypp/repo/DeltaCandidates.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/DeltaCandidates.cc?rev=10150&r1=10149&r2=10150&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/DeltaCandidates.cc (original) +++ trunk/libzypp/zypp/repo/DeltaCandidates.cc Mon May 19 21:10:33 2008 @@ -95,8 +95,6 @@ { std::list<DeltaRpm> candidates; -#warning deltaRpms are not completely implemented - // query all repos for ( std::list<Repository>::const_iterator it = _pimpl->repos.begin(); it != _pimpl->repos.end(); ++it ) @@ -114,11 +112,13 @@ { DeltaRpm delta(*it, di.solvid); DBG << "got delta: " << delta << endl; + DBG << "package: " << package << endl; if ( ! package || ( package->name() == delta.name() && package->edition() == delta.edition() && package->arch() == delta.arch() ) ) { + DBG << "got delta candidate: " << delta << endl; candidates.push_back( delta ); } } Modified: trunk/libzypp/zypp/repo/PackageDelta.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageDelta.cc?rev=10150&r1=10149&r2=10150&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageDelta.cc (original) +++ trunk/libzypp/zypp/repo/PackageDelta.cc Mon May 19 21:10:33 2008 @@ -43,6 +43,7 @@ } DeltaRpm::DeltaRpm(const Repository & repo, sat::detail::IdType extraid) + : _repo(repo) { MIL << "creating deltarpm from repo " << repo.name() << ", id " << extraid << endl; ::Dataiterator di; @@ -69,18 +70,16 @@ setName(IdString(di.kv.id).asString()); break; } - /* \todo add this to the deltainfo parser in sat case DELTA_PACKAGE_EVR: { - setEdition(Edition(di.kv.str)); + setEdition(Edition(IdString(di.kv.id).asString())); break; } case DELTA_PACKAGE_ARCH: { - setArch(Arch(di.kv.str)); + setArch(Arch(IdString(di.kv.id).asString())); break; } - */ case DELTA_LOCATION_DIR: { locdir = IdString(di.kv.id).asString(); Modified: trunk/libzypp/zypp/repo/PackageDelta.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageDelta.h?rev=10150&r1=10149&r2=10150&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageDelta.h (original) +++ trunk/libzypp/zypp/repo/PackageDelta.h Mon May 19 21:10:33 2008 @@ -123,6 +123,7 @@ const OnMediaLocation & location() const { return _location; } const BaseVersion & baseversion() const { return _baseversion; } //const Date & buildtime() const { return _buildtime;} + const Repository & repository() const { return _repo; } public: DeltaRpm & setName( const std::string & val_r ) { _name = val_r; return *this; } @@ -139,6 +140,7 @@ OnMediaLocation _location; BaseVersion _baseversion; //Date _buildtime; + Repository _repo; }; /** \relates DeltaRpm Stream output. */ Modified: trunk/libzypp/zypp/repo/PackageProvider.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageProvider.cc?rev=10150&r1=10149&r2=10150&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageProvider.cc (original) +++ trunk/libzypp/zypp/repo/PackageProvider.cc Mon May 19 21:10:33 2008 @@ -218,7 +218,7 @@ { ProvideFilePolicy policy; policy.progressCB( bind( &PackageProvider::progressDeltaDownload, this, _1 ) ); - delta = _access.provideFile( _package->repoInfo(), delta_r.location(), policy ); + delta = _access.provideFile( delta_r.repository().info(), delta_r.location(), policy ); } catch ( const Exception & excpt ) { -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org