Author: dmacvicar Date: Tue Sep 23 13:52:38 2008 New Revision: 11133 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11133&view=rev Log: - remove patch rpms Modified: trunk/libzypp/zypp/repo/DeltaCandidates.cc trunk/libzypp/zypp/repo/DeltaCandidates.h trunk/libzypp/zypp/repo/PackageDelta.cc trunk/libzypp/zypp/repo/PackageDelta.h trunk/libzypp/zypp/repo/PackageProvider.cc trunk/libzypp/zypp/repo/PackageProvider.h Modified: trunk/libzypp/zypp/repo/DeltaCandidates.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/DeltaCandidates.cc?rev=11133&r1=11132&r2=11133&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/DeltaCandidates.cc (original) +++ trunk/libzypp/zypp/repo/DeltaCandidates.cc Tue Sep 23 13:52:38 2008 @@ -63,34 +63,6 @@ DeltaCandidates::~DeltaCandidates() {} - std::list<PatchRpm> DeltaCandidates::patchRpms(const Package::constPtr & package ) const - { - std::list<PatchRpm> candidates; - - // query all repos - for ( std::list<Repository>::const_iterator it = _pimpl->repos.begin(); - it != _pimpl->repos.end(); - ++it ) - { - // all delta in repo - #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 ) - { - if ( ! package - || ( package->name() == dit->name() - && package->edition() == dit->edition() - && package->arch() == dit->arch() ) ) - { - candidates.push_back( *dit ); - } - } - } - return candidates; - } - std::list<DeltaRpm> DeltaCandidates::deltaRpms(const Package::constPtr & package) const { std::list<DeltaRpm> candidates; Modified: trunk/libzypp/zypp/repo/DeltaCandidates.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/DeltaCandidates.h?rev=11133&r1=11132&r2=11133&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/DeltaCandidates.h (original) +++ trunk/libzypp/zypp/repo/DeltaCandidates.h Tue Sep 23 13:52:38 2008 @@ -51,8 +51,6 @@ /** Dtor */ ~DeltaCandidates(); - - std::listpackagedelta::PatchRpm patchRpms(const Package::constPtr & package) const; std::listpackagedelta::DeltaRpm deltaRpms(const Package::constPtr & package) const; private: Modified: trunk/libzypp/zypp/repo/PackageDelta.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageDelta.cc?rev=11133&r1=11132&r2=11133&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageDelta.cc (original) +++ trunk/libzypp/zypp/repo/PackageDelta.cc Tue Sep 23 13:52:38 2008 @@ -31,17 +31,6 @@ { ///////////////////////////////////////////////////////////////// - std::ostream & operator<<( std::ostream & str, const PatchRpm & obj ) - { - str - << "PatchRpm[" << obj.name() << "-" << obj.edition() << "." << obj.arch() - << "](" << obj.location() - << '|' << obj.buildtime() - << '|'; - return dumpRangeLine( str, obj.baseversions().begin(), obj.baseversions().end() ) - << ')'; - } - DeltaRpm::DeltaRpm(const Repository & repo, sat::detail::IdType extraid) : _repo(repo) { Modified: trunk/libzypp/zypp/repo/PackageDelta.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageDelta.h?rev=11133&r1=11132&r2=11133&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageDelta.h (original) +++ trunk/libzypp/zypp/repo/PackageDelta.h Tue Sep 23 13:52:38 2008 @@ -30,52 +30,6 @@ namespace packagedelta { ///////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////// - - /** \todo cheap copy! (switch to RWCOW) */ - class PatchRpm - { - public: - typedef Edition BaseVersion; - typedef std::list<BaseVersion> BaseVersions; - - public: - PatchRpm() - {} - - public: - /** \name Target package ident. */ - //@{ - const std::string & name() const { return _name; } - const Edition & edition() const { return _edition; } - const Arch & arch() const { return _arch; } - //@} - const OnMediaLocation & location() const { return _location; } - const BaseVersions & baseversions() const { return _baseversions; } - const Date & buildtime() const { return _buildtime;} - - public: - PatchRpm & setName( const std::string & val_r ) { _name = val_r; return *this; } - PatchRpm & setEdition( const Edition & val_r ) { _edition = val_r; return *this; } - PatchRpm & setArch( const Arch & val_r ) { _arch = val_r; return *this; } - PatchRpm & setLocation( const OnMediaLocation & val_r ) { _location = val_r; return *this; } - PatchRpm & setBaseversions( const BaseVersions & val_r ){ _baseversions = val_r; return *this; } - PatchRpm & addBaseversion( const BaseVersion & val_r ) { _baseversions.push_back( val_r ); return *this; } - PatchRpm & setBuildtime( const Date & val_r ) { _buildtime = val_r; return *this; } - - private: - std::string _name; - Edition _edition; - Arch _arch; - OnMediaLocation _location; - BaseVersions _baseversions; - Date _buildtime; - }; - - /** \relates PatchRpm Stream output. */ - std::ostream & operator<<( std::ostream & str, const PatchRpm & obj ); - - /////////////////////////////////////////////////////////////////// /** \todo cheap copy! (switch to RWCOW) */ class DeltaRpm Modified: trunk/libzypp/zypp/repo/PackageProvider.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageProvider.cc?rev=11133&r1=11132&r2=11133&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageProvider.cc (original) +++ trunk/libzypp/zypp/repo/PackageProvider.cc Tue Sep 23 13:52:38 2008 @@ -136,16 +136,7 @@ _deltas.deltaRpms( _package ).swap( deltaRpms ); } - std::list<PatchRpm> patchRpms; -#warning cleanup patchrpm -#if 0 - if ( ZConfig::instance().download_use_patchrpm() ) - { - _deltas.patchRpms( _package ).swap( patchRpms ); - } -#endif - - if ( ! ( deltaRpms.empty() && patchRpms.empty() ) + if ( ! ( deltaRpms.empty() ) && queryInstalled() ) { if ( ! deltaRpms.empty() && applydeltarpm::haveApplydeltarpm() ) @@ -159,42 +150,6 @@ return ret; } } - - if ( ! patchRpms.empty() ) - { - for( std::list<PatchRpm>::const_iterator it = patchRpms.begin(); - it != patchRpms.end(); ++it ) - { - DBG << "tryPatch " << *it << endl; - ManagedFile ret( tryPatch( *it ) ); - if ( ! ret->empty() ) - return ret; - } - } - } - } - else - { - // allow patch rpm from local source - std::list<PatchRpm> patchRpms; -#warning cleanup patchrpm -#if 0 - if ( ZConfig::instance().download_use_patchrpm() ) - { - _deltas.patchRpms( _package ).swap( patchRpms ); - } -#endif - - if ( ! patchRpms.empty() && queryInstalled() ) - { - for( std::list<PatchRpm>::const_iterator it = patchRpms.begin(); - it != patchRpms.end(); ++it ) - { - DBG << "tryPatch " << *it << endl; - ManagedFile ret( tryPatch( *it ) ); - if ( ! ret->empty() ) - return ret; - } } } @@ -258,35 +213,6 @@ return ManagedFile( destination, filesystem::unlink ); } - ManagedFile PackageProvider::tryPatch( const PatchRpm & patch_r ) const - { - // installed edition is in baseversions? - const PatchRpm::BaseVersions & baseversions( patch_r.baseversions() ); - - if ( std::find_if( baseversions.begin(), baseversions.end(), - bind( &PackageProvider::queryInstalled, this, _1 ) ) - == baseversions.end() ) - return ManagedFile(); - - report()->startPatchDownload( patch_r.location().filename(), - patch_r.location().downloadSize() ); - ManagedFile patch; - try - { - ProvideFilePolicy policy; - policy.progressCB( bind( &PackageProvider::progressPatchDownload, this, _1 ) ); - patch = _access.provideFile( _package->repoInfo(), patch_r.location(), policy ); - } - catch ( const Exception & excpt ) - { - report()->problemPatchDownload( excpt.asUserString() ); - return ManagedFile(); - } - report()->finishPatchDownload(); - - return patch; - } - PackageProvider::ScopedGuard PackageProvider::newReport() const { _report.reset( new Report ); @@ -306,9 +232,6 @@ void PackageProvider::progressDeltaApply( int value ) const { return report()->progressDeltaApply( value ); } - bool PackageProvider::progressPatchDownload( int value ) const - { return report()->progressPatchDownload( value ); } - bool PackageProvider::progressPackageDownload( int value ) const { return report()->progress( value, _package ); } Modified: trunk/libzypp/zypp/repo/PackageProvider.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageProvider.h?rev=11133&r1=11132&r2=11133&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/PackageProvider.h (original) +++ trunk/libzypp/zypp/repo/PackageProvider.h Tue Sep 23 13:52:38 2008 @@ -59,7 +59,7 @@ // CLASS NAME : PackageProvider // /** Provide a package from a Source. - * Use available delta/patch-rpm if apropriate. + * Use available deltarpm if apropriate. */ class PackageProvider : private base::NonCopyable { @@ -67,8 +67,6 @@ typedef callback::SendReportrepo::DownloadResolvableReport Report; typedef packagedelta::DeltaRpm DeltaRpm; - typedef packagedelta::PatchRpm PatchRpm; - public: /** Ctor taking the Package to provide. */ @@ -87,14 +85,12 @@ private: ManagedFile doProvidePackage() const; ManagedFile tryDelta( const DeltaRpm & delta_r ) const; - ManagedFile tryPatch( const PatchRpm & patch_r ) const; private: ScopedGuard newReport() const; Report & report() const; bool progressDeltaDownload( int value ) const; void progressDeltaApply( int value ) const; - bool progressPatchDownload( int value ) const; bool progressPackageDownload( int value ) const; bool failOnChecksumError() const; bool queryInstalled( const Edition & ed_r = Edition() ) const; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org