Author: mlandres
Date: Tue Jul 17 15:54:13 2007
New Revision: 6047
URL: http://svn.opensuse.org/viewcvs/zypp?rev=6047&view=rev
Log:
- Fixed OnMediLocation to use safe defaults. Added setLocaltion and
additional ctor for convenience.
Modified:
trunk/libzypp/devel/devel.ma/Parse.cc
trunk/libzypp/package/libzypp.changes
trunk/libzypp/zypp/OnMediaLocation.h
trunk/libzypp/zypp/detail/SelectionImplIf.cc
trunk/libzypp/zypp/parser/susetags/PackagesFileReader.cc
trunk/libzypp/zypp/parser/susetags/RepoParser.cc
trunk/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc
trunk/libzypp/zypp/parser/yum/PatchFileReader.cc
trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc
trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc
trunk/libzypp/zypp/repo/PackageDelta.h
trunk/libzypp/zypp/repo/cached/PackageImpl.cc
trunk/libzypp/zypp/repo/cached/RepoImpl.cc
trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc
trunk/libzypp/zypp/repo/susetags/Downloader.cc
trunk/libzypp/zypp/repo/yum/Downloader.cc
trunk/libzypp/zypp/target/rpm/RpmDb.cc
Modified: trunk/libzypp/devel/devel.ma/Parse.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Parse.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Parse.cc (original)
+++ trunk/libzypp/devel/devel.ma/Parse.cc Tue Jul 17 15:54:13 2007
@@ -291,7 +291,7 @@
{
RepoInfo & nrepo( *it );
- if ( 0 )
+ if ( 1 )
{
if ( repoManager.isCached( nrepo ) )
{
Modified: trunk/libzypp/package/libzypp.changes
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/package/libzypp.changes?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/package/libzypp.changes (original)
+++ trunk/libzypp/package/libzypp.changes Tue Jul 17 15:54:13 2007
@@ -1,8 +1,14 @@
-------------------------------------------------------------------
+Tue Jul 17 15:57:03 CEST 2007 - ma@suse.de
+
+- Fixed OnMediLocation to use safe defaults. Added setLocaltion and
+ additional ctor for convenience.
+
+-------------------------------------------------------------------
Tue Jul 17 10:45:39 CEST 2007 - schubi@suse.de
-- Evalute update canditate:
- Take canditates only which are really installable. Bug 292077
+- Evalute update canditate:
+ Take canditates only which are really installable. Bug 292077
r 6034
-------------------------------------------------------------------
@@ -123,7 +129,7 @@
-------------------------------------------------------------------
Fri Jun 22 15:28:03 CEST 2007 - schubi@suse.de
-- New API calls which provides more information about one
+- New API calls which provides more information about one
resolvable after a solverrun:
isInstalledBy (const PoolItem_Ref item);
installs (const PoolItem_Ref item);
Modified: trunk/libzypp/zypp/OnMediaLocation.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/OnMediaLocation.h?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/OnMediaLocation.h (original)
+++ trunk/libzypp/zypp/OnMediaLocation.h Tue Jul 17 15:54:13 2007
@@ -14,6 +14,7 @@
#include <iosfwd>
+#include "zypp/base/Deprecated.h"
#include "zypp/Pathname.h"
#include "zypp/ByteCount.h"
#include "zypp/CheckSum.h"
@@ -27,19 +28,26 @@
// CLASS NAME : OnMediaLocation
//
/**
- * Describes a path ona certain media amongs as the information
- * required to download it, like its media number, checksum and
- * size.
- * it does not specifies the URI of the file.
+ * Describes a path on a certain media amongs as the information
+ * required to download it, like its media number, checksum and
+ * size. It does not specify the URI of the file.
+ *
+ * Media number \c 0 usually indicates no media access.
*/
class OnMediaLocation
{
friend std::ostream & operator<<( std::ostream & str, const OnMediaLocation & obj );
public:
- /** Ctor */
+ /** Default ctor indicating no media access. */
OnMediaLocation()
- : _medianr( 1 )
+ : _medianr( 0 )
+ {}
+
+ /** Ctor taking a filename and media number (defaults to 1). */
+ OnMediaLocation( const Pathname & filename_r, unsigned medianr_r )
+ : _medianr( medianr_r )
+ , _filename( filename_r )
{}
public:
@@ -47,16 +55,55 @@
const Pathname & filename() const { return _filename; }
const CheckSum & checksum() const { return _checksum; }
const ByteCount & downloadSize() const { return _downloadsize; }
- const ByteCount & openSize() const { return _opendownloadsize; }
- const CheckSum & openChecksum() const { return _openchecksum; }
+ const ByteCount & openSize() const { return _opendownloadsize; }
+ const CheckSum & openChecksum() const { return _openchecksum; }
public:
- OnMediaLocation & setMedianr( unsigned val_r ) { _medianr = val_r; return *this; }
- OnMediaLocation & setFilename( const Pathname & val_r ) { _filename = val_r; return *this; }
- OnMediaLocation & setChecksum( const CheckSum & val_r ) { _checksum = val_r; return *this; }
- OnMediaLocation & setDownloadSize( const ByteCount & val_r ) { _downloadsize = val_r; return *this; }
- OnMediaLocation & setOpenChecksum( const CheckSum & val_r ) { _openchecksum = val_r; return *this; }
- OnMediaLocation & setOpenSize( const ByteCount & val_r ) { _opendownloadsize = val_r; return *this; }
+ /** Unset \c filename and set \c medianr to \c 0. */
+ OnMediaLocation & unsetLocation()
+ { _filename = Pathname(); _medianr = 0; return *this; }
+
+ /** Set filename and media number (defaults to \c 1). */
+ OnMediaLocation & setLocation( const Pathname & val_r,
+ unsigned mediaNumber_r )
+ { _filename = val_r; _medianr = mediaNumber_r; return *this; }
+
+ /** Set the files size. */
+ OnMediaLocation & setDownloadSize( const ByteCount & val_r )
+ { _downloadsize = val_r; return *this; }
+
+ /** Set the files checksum. */
+ OnMediaLocation & setChecksum( const CheckSum & val_r )
+ { _checksum = val_r; return *this; }
+
+ /** Set the files open (uncompressed) size. */
+ OnMediaLocation & setOpenSize( const ByteCount & val_r )
+ { _opendownloadsize = val_r; return *this; }
+
+ /** Set the files open (uncompressed) checksum. */
+ OnMediaLocation & setOpenChecksum( const CheckSum & val_r )
+ { _openchecksum = val_r; return *this; }
+
+ public:
+ /** \deprecated use \ref setLocation or \ref changeMedianr */
+ ZYPP_DEPRECATED OnMediaLocation & xsetMedianr( unsigned val_r )
+ { return changeMedianr( val_r ); }
+ /** \deprecated use \ref setLocation or \ref changeFilename */
+ ZYPP_DEPRECATED OnMediaLocation & xsetFilename( const Pathname & val_r )
+ { return changeFilename( val_r ); }
+
+ /** Individual manipulation of \c medianr.
+ * Using \ref setLocation is prefered.
+ */
+ OnMediaLocation & changeMedianr( unsigned val_r )
+ { _medianr = val_r; return *this; }
+
+ /** Individual manipulation of \c filename.
+ * Using \ref setLocation is prefered.
+ */
+ OnMediaLocation & changeFilename( const Pathname & val_r )
+ { _filename = val_r; return *this; }
+
private:
unsigned _medianr;
Pathname _filename;
Modified: trunk/libzypp/zypp/detail/SelectionImplIf.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/SelectionImplIf.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/detail/SelectionImplIf.cc (original)
+++ trunk/libzypp/zypp/detail/SelectionImplIf.cc Tue Jul 17 15:54:13 2007
@@ -9,9 +9,10 @@
/** \file zypp/detail/SelectionImplIf.cc
*
*/
+#include <iostream>
+
#include "zypp/detail/SelectionImplIf.h"
#include "zypp/ResTraits.h"
-#include <iostream>
using namespace std;
@@ -50,7 +51,6 @@
const std::setstd::string SelectionImplIf::install_packages( const Locale & lang) const
{
std::setstd::string result;
- #warning does not honor language packs
copycaps( result, self()->dep( Dep::REQUIRES ) );
copycaps( result, self()->dep( Dep::RECOMMENDS) );
Modified: trunk/libzypp/zypp/parser/susetags/PackagesFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/PackagesFileReader.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/PackagesFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/susetags/PackagesFileReader.cc Tue Jul 17 15:54:13 2007
@@ -159,13 +159,13 @@
switch ( str::split( tag_r->value, std::back_inserter(words) ) )
{
case 2: // [medianr filename]
- _data->repositoryLocation.setMedianr( str::strtonum<unsigned>(words[0]) );
- _data->repositoryLocation.setFilename( Pathname(_data->arch.asString()) / words[1] );
+ _data->repositoryLocation.setLocation( Pathname(_data->arch.asString()) / words[1],
+ str::strtonum<unsigned>(words[0]) );
break;
case 3: // [medianr filename dir]
- _data->repositoryLocation.setMedianr( str::strtonum<unsigned>(words[0]) );
- _data->repositoryLocation.setFilename( Pathname(words[2]) / words[1] );
+ _data->repositoryLocation.setLocation( Pathname(words[2]) / words[1],
+ str::strtonum<unsigned>(words[0]) );
break;
default:
Modified: trunk/libzypp/zypp/parser/susetags/RepoParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/susetags/RepoParser.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/susetags/RepoParser.cc (original)
+++ trunk/libzypp/zypp/parser/susetags/RepoParser.cc Tue Jul 17 15:54:13 2007
@@ -169,7 +169,7 @@
void fixLocationPath( const data::Packagebase_Ptr & data_r )
{
Pathname tofix( data_r->repositoryLocation.filename() );
- data_r->repositoryLocation.setFilename( _datadir / tofix );
+ data_r->repositoryLocation.changeFilename( _datadir / tofix );
}
/** Resolve shared data tag. */
Modified: trunk/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc (original)
+++ trunk/libzypp/zypp/parser/yum/FileReaderBaseImpl.cc Tue Jul 17 15:54:13 2007
@@ -112,7 +112,7 @@
return true;
}
- // xpath: //package/packager
+ // xpath: //package/packager
if (reader_r->name() == "packager")
{
package_ptr->packager = reader_r.nodeText().asString();
@@ -152,7 +152,7 @@
// xpath: //package/location
if (reader_r->name() == "location")
{
- package_ptr->repositoryLocation.setFilename(reader_r->getAttribute("href").asString());
+ package_ptr->repositoryLocation.setLocation(reader_r->getAttribute("href").asString(), 1);
return true;
}
@@ -186,7 +186,7 @@
{
if (consumeDependency(reader_r, package_ptr->deps))
// this node has been a dependency, which has been handled by
- // consumeDependency(), so return right away.
+ // consumeDependency(), so return right away.
return true;
// DBG << "format subtag: " << reader_r->name() << endl;
@@ -228,7 +228,7 @@
return true;
}
- //! \todo xpath: //format/rpm:header-range what is this?
+ //! \todo xpath: //format/rpm:header-range what is this?
if (reader_r->name() == "rpm:header-range")
{
//reader_r->getAttribute("start").asString(),
@@ -236,7 +236,7 @@
return true;
}
- //! \todo xpath: //format/file (*) figure out where to store this and what's it about (in regard to filelists.xml.gz)
+ //! \todo xpath: //format/file (*) figure out where to store this and what's it about (in regard to filelists.xml.gz)
if (reader_r->name() == "file")
{
// file = reader_r.nodeText().asString();
@@ -311,7 +311,7 @@
if (kind_str.empty())
kind = ResTraits<Package>::kind;
else
- kind = Resolvable::Kind(kind_str);
+ kind = Resolvable::Kind(kind_str);
// Check whether this is actually a prerequires dependency.
// If so, it will be stored in deps_r as Dep::PREREQUIRES
Modified: trunk/libzypp/zypp/parser/yum/PatchFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/PatchFileReader.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/PatchFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/yum/PatchFileReader.cc Tue Jul 17 15:54:13 2007
@@ -44,8 +44,8 @@
/**
* Callback provided to the XML reader.
- *
- * \param the xml reader object reading the file
+ *
+ * \param the xml reader object reading the file
* \return true to tell the reader to continue, false to tell it to stop
*
* \see PrimaryFileReader::consumeNode(xml::Reader)
@@ -54,10 +54,10 @@
/**
* Process <tt>atoms</tt> node and all of its children.
- *
+ *
* \param reader_r XML file reader reading the patch file.
* \return true if current node has been completely processed, false
- * if additional processing is required outside of the method.
+ * if additional processing is required outside of the method.
*/
bool consumeAtomsNode(xml::Reader & reader_r);
@@ -65,46 +65,46 @@
* Process <tt>package</tt> node and all of its children. This method
* uses \ref FileReaderBase::consumePackageNode(xml::Reader,data::Package_Ptr)
* method and adds <tt>pkgfiles</tt> element processing.
- *
+ *
* \param reader_r XML file reader reading the patch file.
* \return true if current node has been completely processed, false
- * if additional processing is required outside of the method.
+ * if additional processing is required outside of the method.
*/
bool consumePackageNode(xml::Reader & reader_r);
/**
* Process <tt>patchrpm</tt> node and all of its children.
- *
+ *
* \param reader_r XML file reader reading the patch file.
* \return true if current node has been completely processed, false
- * if additional processing is required outside of the method.
+ * if additional processing is required outside of the method.
*/
bool consumePatchrpmNode(xml::Reader & reader_r);
/**
* Process <tt>deltarpm</tt> node and all of its children.
- *
+ *
* \param reader_r XML file reader reading the patch file.
* \return true if current node has been completely processed, false
- * if additional processing is required outside of the method.
+ * if additional processing is required outside of the method.
*/
bool consumeDeltarpmNode(xml::Reader & reader_r);
/**
* Process <tt>message</tt> node and all of its children.
- *
+ *
* \param reader_r XML file reader reading the patch file.
* \return true if current node has been completely processed, false
- * if additional processing is required outside of the method.
+ * if additional processing is required outside of the method.
*/
bool consumeMessageNode(xml::Reader & reader_r);
/**
* Process <tt>script</tt> node and all of its children.
- *
+ *
* \param reader_r XML file reader reading the patch file.
* \return true if current node has been completely processed, false
- * if additional processing is required outside of the method.
+ * if additional processing is required outside of the method.
*/
bool consumeScriptNode(xml::Reader & reader_r);
@@ -123,7 +123,7 @@
void saveAtomInPatch();
/**
- *
+ *
*/
void copyPackageAtomFromTmpObj(data::Atom_Ptr & atom_ptr) const;
@@ -171,10 +171,10 @@
/*
* xpath and multiplicity of processed nodes are included in the code
* for convenience:
- *
+ *
* // xpath: <xpath> (?|*|+)
- *
- * if multiplicity is ommited, then the node has multiplicity 'one'.
+ *
+ * if multiplicity is ommited, then the node has multiplicity 'one'.
*/
// --------------------------------------------------------------------------
@@ -242,7 +242,7 @@
// dependency block nodes
if (consumeDependency(reader_r, _patch->deps))
- return true;
+ return true;
// xpath: /patch/category
if (reader_r->name() == "category")
@@ -288,7 +288,7 @@
if (reader_r->name() == "patch")
{
if (!_patch->atoms.size())
- WAR << "No atoms found for patch " << _patch->name << " " << _patch->edition << endl;
+ WAR << "No atoms found for patch " << _patch->name << " " << _patch->edition << endl;
if (_callback)
_callback(handoutPatch());
@@ -359,7 +359,7 @@
// xpath: /patch/atoms/package
if (reader_r->name() == "package")
{
- // DBG << "Atom " << _tmpResObj->name << " " << _tmpResObj->edition << " successfully read." << endl;
+ // DBG << "Atom " << _tmpResObj->name << " " << _tmpResObj->edition << " successfully read." << endl;
saveAtomInPatch();
toParentTag(); // back to processing of previous tag (atoms)
@@ -510,7 +510,7 @@
// xpath: /patch/atoms/package/patchrpm/location
if (reader_r->name() == "location")
{
- _patchrpm->location.setFilename(reader_r->getAttribute("href").asString());
+ _patchrpm->location.setLocation(reader_r->getAttribute("href").asString(), 1);
// ignoring attribute 'base'
return true;
}
@@ -586,7 +586,7 @@
// xpath: /patch/atoms/package/deltarpm/location
if (reader_r->name() == "location")
{
- _deltarpm->location.setFilename(reader_r->getAttribute("href").asString());
+ _deltarpm->location.setLocation(reader_r->getAttribute("href").asString(), 1);
// ignoring attribute 'base'
return true;
}
@@ -763,7 +763,7 @@
// ignoring reader_r->getAttribute("xml:base").asString();
// xsd:anyURI do script file path
- script->doScriptLocation.setFilename(reader_r->getAttribute("href").asString());
+ script->doScriptLocation.setLocation(reader_r->getAttribute("href").asString(), 1);
return true;
}
@@ -783,7 +783,7 @@
// ignoring reader_r->getAttribute("xml:base").asString();
// xsd:anyURI undo script file path
- script->undoScriptLocation.setFilename(reader_r->getAttribute("href").asString());
+ script->undoScriptLocation.setLocation(reader_r->getAttribute("href").asString(), 1);
return true;
}
Modified: trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/yum/PatchesFileReader.cc Tue Jul 17 15:54:13 2007
@@ -59,7 +59,7 @@
* Callback provided to the XML parser. Don't use it.
*/
bool consumeNode( Reader & reader_r );
-
+
private:
OnMediaLocation _location;
Tag _tag;
@@ -103,7 +103,7 @@
if ( reader_r->name() == "location" )
{
_tag = tag_Location;
- _location.setFilename( reader_r->getAttribute("href").asString() );
+ _location.setLocation( reader_r->getAttribute("href").asString(), 1 );
return true;
}
if ( reader_r->name() == "checksum" )
@@ -141,7 +141,7 @@
const ProcessResource & callback)
: _pimpl(new Impl(patches_file, callback))
{}
-
+
PatchesFileReader::~PatchesFileReader()
{}
Modified: trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc Tue Jul 17 15:54:13 2007
@@ -59,7 +59,7 @@
public:
/**
* CTOR
- *
+ *
* \see RepomdFileReader::RepomdFileReader(Pathname,ProcessResource)
*/
Impl(const Pathname &repomd_file, const ProcessResource & callback);
@@ -85,7 +85,7 @@
/** Checksum of metadata file */
CheckSum _checksum;
-
+
/** Type of checksum of metadata file */
std::string _checksum_type;
@@ -97,7 +97,7 @@
RepomdFileReader::Impl::Impl(
const Pathname &repomd_file, const ProcessResource & callback)
:
- _tag(tag_NONE), _type(ResourceType::NONE_e), _callback(callback)
+ _tag(tag_NONE), _type(ResourceType::NONE_e), _callback(callback)
{
Reader reader( repomd_file );
MIL << "Reading " << repomd_file << endl;
@@ -109,10 +109,10 @@
/*
* xpath and multiplicity of processed nodes are included in the code
* for convenience:
- *
+ *
* // xpath: <xpath> (?|*|+)
- *
- * if multiplicity is ommited, then the node has multiplicity 'one'.
+ *
+ * if multiplicity is ommited, then the node has multiplicity 'one'.
*/
// --------------------------------------------------------------------------
@@ -140,7 +140,7 @@
if ( reader_r->name() == "location" )
{
_tag = tag_Location;
- _location.setFilename( reader_r->getAttribute("href").asString() );
+ _location.setLocation( reader_r->getAttribute("href").asString(), 1 );
// ignoring attribute xml:base
return true;
}
@@ -190,7 +190,7 @@
RepomdFileReader::RepomdFileReader(
const Pathname & repomd_file, const ProcessResource & callback)
:
- _pimpl(new Impl(repomd_file, callback))
+ _pimpl(new Impl(repomd_file, callback))
{}
RepomdFileReader::~RepomdFileReader()
Modified: trunk/libzypp/zypp/repo/PackageDelta.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/PackageDelta.h?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/PackageDelta.h (original)
+++ trunk/libzypp/zypp/repo/PackageDelta.h Tue Jul 17 15:54:13 2007
@@ -18,7 +18,6 @@
#include "zypp/OnMediaLocation.h"
#include "zypp/Edition.h"
#include "zypp/Date.h"
-//#include "zypp/Arch.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -41,19 +40,19 @@
public:
const OnMediaLocation & location() const { return _location; }
- const BaseVersions & baseversions() const { return _baseversions; }
- const Date & buildtime() const { return _buildtime;}
+ const BaseVersions & baseversions() const { return _baseversions; }
+ const Date & buildtime() const { return _buildtime;}
public:
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; }
+ 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:
OnMediaLocation _location;
- BaseVersions _baseversions;
- Date _buildtime;
+ BaseVersions _baseversions;
+ Date _buildtime;
};
/** \relates PatchRpm Stream output. */
@@ -97,8 +96,8 @@
public:
const OnMediaLocation & location() const { return _location; }
- const BaseVersion & baseversion() const { return _baseversion; }
- const Date & buildtime() const { return _buildtime;}
+ const BaseVersion & baseversion() const { return _baseversion; }
+ const Date & buildtime() const { return _buildtime;}
public:
DeltaRpm & setLocation( const OnMediaLocation & val_r ) { _location = val_r; return *this; }
@@ -107,8 +106,8 @@
private:
OnMediaLocation _location;
- BaseVersion _baseversion;
- Date _buildtime;
+ BaseVersion _baseversion;
+ Date _buildtime;
};
/** \relates DeltaRpm Stream output. */
Modified: trunk/libzypp/zypp/repo/cached/PackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PackageImpl.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PackageImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/PackageImpl.cc Tue Jul 17 15:54:13 2007
@@ -136,22 +136,20 @@
OnMediaLocation PackageImpl::location() const
{
- OnMediaLocation loc;
+ OnMediaLocation loc( _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageLocationFilename() ),
+ _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationMediaNr() ) );
+
string chktype = _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageLocationChecksumType() );
string chkvalue = _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageLocationChecksum() );
loc.setChecksum(CheckSum(chktype, chkvalue));
-
- loc.setFilename( _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageLocationFilename() ) );
-
+
loc.setDownloadSize( _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationDownloadSize() ) );
loc.setOpenSize( _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationOpenSize() ) );
-
- loc.setMedianr( _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationMediaNr() ) );
-
+
chktype = _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageLocationOpenChecksumType() );
chkvalue = _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageLocationOpenChecksum() );
loc.setOpenChecksum(CheckSum(chktype, chkvalue));
-
+
return loc;
}
Modified: trunk/libzypp/zypp/repo/cached/RepoImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/RepoImpl.cc?rev=6047&r1=6046&r2=6047&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/RepoImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/RepoImpl.cc Tue Jul 17 15:54:13 2007
@@ -74,7 +74,7 @@
RepoImpl *r = (RepoImpl *)(ptr);
if ( r )
return r->progress_handler(ptr);
-
+
return 1;
}
@@ -100,14 +100,14 @@
_ticks = ProgressData();
_ticks.sendTo(_options.readingResolvablesProgress);
_ticks.name(str::form(_( "Reading '%s' repository cache"), info().alias().c_str()));
-
+
debug::Measure m("create resolvables");
CapFactory capfactory;
try
{
sqlite3_connection con((_options.dbdir + "zypp.db").asString().c_str());
//con.setprogresshandler(100, global_progress_handler, (void*)this);
-
+
con.executenonquery("PRAGMA cache_size=8000;");
con.executenonquery("BEGIN;");
@@ -115,7 +115,7 @@
// sqlite3_command total_cmd("select count(id) from resolvables where repository_id=:repository_id;");
// total_cmd.bind(":repository_id", _repository_id);
// int total = total_cmd.executeint();
-
+
sqlite3_command cmd( con, "select id,name,version,release,epoch,arch,kind from resolvables where repository_id=:repository_id;");
cmd.bind(":repository_id", _options.repository_id);
map