Author: dmacvicar
Date: Sat Feb 2 04:32:24 2008
New Revision: 8445
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8445&view=rev
Log:
loading rpm from solv works ;-)
Modified:
branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/CMakeLists.txt
branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc
branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/SolvStore_tp.cc
branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/testbed.cc
branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Target.cc
branches/tmp/ma/jump_sat/libzypp/zypp/Target.h
branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc
branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h
Modified: branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/CMakeLists.txt?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/CMakeLists.txt (original)
+++ branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/CMakeLists.txt Sat Feb 2 04:32:24 2008
@@ -12,8 +12,8 @@
ADD_EXECUTABLE(solvstore SolvStore_tp.cc)
TARGET_LINK_LIBRARIES(solvstore zypp )
-#ADD_EXECUTABLE(testbed testbed.cc)
-#TARGET_LINK_LIBRARIES(testbed zypp )
+ADD_EXECUTABLE(testbed testbed.cc)
+TARGET_LINK_LIBRARIES(testbed zypp )
#ADD_EXECUTABLE(yum-downloader YUMDownloader_tp.cc)
#TARGET_LINK_LIBRARIES(yum-downloader zypp )
Modified: branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/RepositoryManager_tp.cc Sat Feb 2 04:32:24 2008
@@ -41,7 +41,7 @@
{
cout << *it << endl;
Repository repo = manager.createFromCache(*it);
- z->addResolvables(repo.resolvables());
+ //z->addResolvables(repo.resolvables());
}
ResPool pool(z->pool());
Modified: branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/SolvStore_tp.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/SolvStore_tp.cc?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/SolvStore_tp.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/SolvStore_tp.cc Sat Feb 2 04:32:24 2008
@@ -29,7 +29,7 @@
{
ZYpp::Ptr z = getZYpp();
filesystem::TmpDir solvdir;
- zypp::cache::SolvStore store(solvdir.path());
+ zypp::cache::SolvStore store(solvdir.path(), "foo");
Measure cap_insert_timer("Insert Capabilities");
parser::yum::RepoParser parser("foo", store);
Modified: branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/testbed.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/testbed.cc?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/testbed.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/devel/devel.dmacvicar/testbed.cc Sat Feb 2 04:32:24 2008
@@ -21,96 +21,15 @@
using namespace std;
using namespace zypp;
using namespace zypp::repo;
-using namespace zypp::repo::cached;
-
-bool task_receiver( ProgressData::value_type v )
-{
- cout << "got ->" << v << endl;
- return( v <= 100 ); // Abort if ( v > 100 )
-}
-
-struct ProgressDataWrapper
-{
- ProgressDataWrapper( ProgressData &pd,
- ProgressData::value_type percentage )
- : _percentage(percentage),
- _last_value(0),
- _pd(pd)
-
- {
-
- }
-
- bool operator()( ProgressData::value_type v )
- {
- MIL << endl;
- ProgressData::value_type increment = v - _last_value;
- int real_increment = (int)((float)(_percentage*increment)/100);
- MIL << "Value: " << v << ". Increment of " << increment << ". Real of " << real_increment << endl;
- _last_value = v;
- return _pd.incr(real_increment);
- }
-
- ProgressData::value_type _percentage;
- ProgressData::value_type _last_value;
- ProgressData &_pd;
-};
-
-// task one is 80%
-void small_task_one( ProgressData::ReceiverFnc rcv )
-{
- MIL << "Small task one" << endl;
- ProgressData progress(100);
- progress.sendTo(rcv);
- progress.toMin();
- progress.set(10);
- progress.set(20);
- progress.set(30);
- progress.set(40);
- progress.set(70);
- progress.toMax();
-}
-
-// task one is 20%
-void small_task_two( ProgressData::ReceiverFnc rcv )
-{
- MIL << "Small task two" << endl;
- ProgressData progress(100);
- progress.sendTo(rcv);
- progress.toMin();
- progress.set(10);
- progress.set(20);
- progress.set(70);
- progress.toMax();
-}
-
-
-void big_task( ProgressData::ReceiverFnc rcv )
-{
- ProgressData progress(100);
- progress.sendTo(rcv);
- progress.toMin();
- ProgressDataWrapper wrapper1( progress, 80 );
- small_task_one( wrapper1 );
- ProgressDataWrapper wrapper2( progress, 20 );
- small_task_two( wrapper2 );
- progress.toMax();
-}
int main(int argc, char **argv)
{
try
{
- //ZYpp::Ptr z = getZYpp();
+ ZYpp::Ptr z = getZYpp();
- //z->initializeTarget("/");
-// filesystem::TmpDir tmpdir;
-// yum::Downloader downloader(Url("http://ftp.gwdg.de/pub/suse/update/10.2"), "/");
-// downloader.download(tmpdir.path(), &yum_download_receiver);
- big_task(&task_receiver);
- //ResStore res = z->target()->resolvables();
- //MIL << res.size() << " resolvables" << endl;
-
+ z->initializeTarget("/");
+ z->target()->load();
}
catch ( const Exception &e )
{
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc Sat Feb 2 04:32:24 2008
@@ -56,7 +56,7 @@
/** \relates RepoStatus::Impl Stream output */
inline std::ostream & operator<<( std::ostream & str, const RepoStatus::Impl & obj )
{
- return str << obj.checksum << " " << obj.timestamp;
+ return str << obj.checksum << " " << (time_t) obj.timestamp;
}
///////////////////////////////////////////////////////////////////
@@ -92,16 +92,10 @@
}
std::string buffer;
- while(file && !file.eof()) {
- getline(file, buffer);
- }
-
- std::vectorstd::string words;
- if ( str::split( buffer, std::back_inserter(words) ) != 2 )
- ZYPP_THROW (Exception( "bad cookie file " + cookiefile.asString() ) );
-
- status.setTimestamp(Date(str::strtonum(words[1])));
- status.setChecksum(words[0]);
+ file >> buffer;
+ status.setChecksum(buffer);
+ file >> buffer;
+ status.setTimestamp(Date(str::strtonum(buffer)));
return status;
}
@@ -111,7 +105,7 @@
if (!file) {
ZYPP_THROW (Exception( "Can't open " + cookiefile.asString() ) );
}
- file << *(this);
+ file << this->checksum() << " " << (int) this->timestamp() << endl << endl;
file.close();
}
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Target.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Target.cc?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Target.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Target.cc Sat Feb 2 04:32:24 2008
@@ -64,6 +64,9 @@
//
///////////////////////////////////////////////////////////////////
+ void Target::load()
+ { _pimpl->load(); }
+
const ResStore & Target::resolvables()
{ return _pimpl->resolvables(); }
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/Target.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/Target.h?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/Target.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/Target.h Sat Feb 2 04:32:24 2008
@@ -58,6 +58,11 @@
/** All resolvables provided by the target. */
const ResStore & resolvables();
+ /**
+ * load resolvables into the pool
+ */
+ void load();
+
/**
* reload the target in future calls if
* needed.
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.cc Sat Feb 2 04:32:24 2008
@@ -21,6 +21,8 @@
#include "zypp/base/Gettext.h"
#include "zypp/base/UserRequestException.h"
+#include "zypp/ZConfig.h"
+
#include "zypp/PoolItem.h"
#include "zypp/Resolvable.h"
#include "zypp/ResObject.h"
@@ -31,6 +33,8 @@
#include "zypp/Script.h"
#include "zypp/Message.h"
#include "zypp/Url.h"
+#include "zypp/RepoStatus.h"
+#include "zypp/ExternalProgram.h"
#include "zypp/CapMatchHelper.h"
#include "zypp/ResFilters.h"
@@ -48,11 +52,16 @@
#include "zypp/repo/ScriptProvider.h"
#include "zypp/repo/SrcPackageProvider.h"
+#include "zypp/sat/Pool.h"
+#include "zypp/sat/Repo.h"
+
using namespace std;
using namespace zypp;
using namespace zypp::resfilter;
using zypp::solver::detail::Helper;
+#define ZYPP_DB ( "/var/lib/zypp/db/" )
+
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -65,8 +74,7 @@
{ /////////////////////////////////////////////////////////////////
void ExecuteScriptHelper( repo::RepoMediaAccess & access_r,
Script::constPtr script_r,
- bool do_r,
- storage::PersistentStorage & storage_r )
+ bool do_r )
{
MIL << "Execute script " << script_r << endl;
if ( ! script_r )
@@ -111,6 +119,7 @@
}
int exitCode = prog.close();
+ /* FIXME
if ( exitCode != 0 )
{
storage_r.setObjectFlag( script_r, "SCRIPT_EXEC_FAILED" );
@@ -123,21 +132,19 @@
{
storage_r.removeObjectFlag( script_r, "SCRIPT_EXEC_FAILED" );
}
-
+ */
report->finish();
return;
}
- inline void ExecuteDoScript( repo::RepoMediaAccess & access_r, const Script::constPtr & script_r,
- storage::PersistentStorage & storage_r )
+ inline void ExecuteDoScript( repo::RepoMediaAccess & access_r, const Script::constPtr & script_r )
{
- ExecuteScriptHelper( access_r, script_r, true, storage_r );
+ ExecuteScriptHelper( access_r, script_r, true );
}
- inline void ExecuteUndoScript( repo::RepoMediaAccess & access_r, const Script::constPtr & script_r,
- storage::PersistentStorage & storage_r )
+ inline void ExecuteUndoScript( repo::RepoMediaAccess & access_r, const Script::constPtr & script_r )
{
- ExecuteScriptHelper( access_r, script_r, false, storage_r );
+ ExecuteScriptHelper( access_r, script_r, false );
}
/////////////////////////////////////////////////////////////////
} // namespace
@@ -150,10 +157,8 @@
/** Helper removing obsoleted non-Package from store. */
struct StorageRemoveObsoleted
{
- StorageRemoveObsoleted( storage::PersistentStorage & storage_r,
- const PoolItem & byPoolitem_r )
- : _storage( storage_r )
- , _byPoolitem( byPoolitem_r )
+ StorageRemoveObsoleted(const PoolItem & byPoolitem_r )
+ : _byPoolitem( byPoolitem_r )
{}
bool operator()( const PoolItem & poolitem_r ) const
@@ -170,7 +175,7 @@
try
{
- _storage.deleteObject( poolitem_r.resolvable() );
+ // delete poolitem_r.resolvable()
MIL<< "Obsoleted: " << poolitem_r << " (by " << _byPoolitem << ")" << endl;
}
catch ( Exception & excpt_r )
@@ -183,7 +188,6 @@
}
private:
- storage::PersistentStorage & _storage;
const PoolItem _byPoolitem;
};
@@ -192,13 +196,11 @@
* Scan \a pool_r for items obsoleted \a byPoolitem_r and remove them from
* \a storage_r.
*/
- void obsoleteMatchesFromStorage( storage::PersistentStorage & storage_r,
- const ResPool & pool_r,
+ void obsoleteMatchesFromStorage( const ResPool & pool_r,
const PoolItem & byPoolitem_r )
{
forEachPoolItemMatchedBy( pool_r, byPoolitem_r, Dep::OBSOLETES,
- OncePerPoolItem( StorageRemoveObsoleted( storage_r,
- byPoolitem_r ) ) );
+ OncePerPoolItem( StorageRemoveObsoleted( byPoolitem_r ) ) );
}
/////////////////////////////////////////////////////////////////
@@ -301,11 +303,49 @@
return _storage_enabled;
}
+ void TargetImpl::load()
+ {
+ Pathname rpmsolv = _root + ZConfig::instance().repoCachePath() + "_rpm.solv";
+ Pathname rpmsolvcookie = rpmsolv.extend(".cookie");
+ bool build_rpm_solv = true;
+ // lets see if the rpm solv cache exists
+
+ RepoStatus rpmstatus(_root + "/var/lib/rpm/Packages");
+ if ( PathInfo(rpmsolv).isExist() )
+ {
+ // see the status of the cache
+ MIL << "Read cookie: " << rpmsolvcookie << endl;
+ RepoStatus status = RepoStatus::fromCookieFile(rpmsolvcookie);
+ MIL << "Read cookie: " << rpmsolvcookie << " done" << endl;
+ // now compare it with the rpm database
+ if ( status.checksum() == rpmstatus.checksum() )
+ build_rpm_solv = false;
+ }
+
+ if ( build_rpm_solv )
+ {
+ MIL << "Executing solv converter" << endl;
+ // FIXME add root to rpmdb2solv
+ string cmd( str::form( "/usr/bin/rpmdb2solv > %s", rpmsolv.asString().c_str() ) );
+ ExternalProgram prog( cmd, ExternalProgram::Stderr_To_Stdout );
+ for ( string output( prog.receiveLine() ); output.length(); output = prog.receiveLine() ) {
+ MIL << " " << output;
+ }
+ int ret = prog.close();
+ if ( ret != 0 )
+ ZYPP_THROW(Exception("Failed to cache rpm database"));
+ rpmstatus.saveToCookieFile(rpmsolvcookie);
+ }
+
+ //now add the repos to the pool
+ MIL << "adding " << rpmsolv << " to pool(" << sat::Pool::instance().systemRepoName() << ")";
+ sat::Repo system = sat::Pool::instance().reposInsert(sat::Pool::instance().systemRepoName());
+ system.addSolv(rpmsolv);
+ MIL << "Target loaded: " << system.solvablesSize() << " resolvables" << endl;
+ }
void TargetImpl::enableStorage(const Pathname &root_r)
{
- _storage.init(root_r);
- _storage_enabled = true;
}
Pathname TargetImpl::root() const
@@ -315,40 +355,7 @@
void TargetImpl::loadKindResolvables( const Resolvable::Kind kind )
{
- // if this kind is already loaded, return
- if ( _resstore_loaded[kind] )
- return;
-
- if ( kind == ResTraitszypp::Package::kind )
- {
- std::listPackage::Ptr packages = _rpm.getPackages();
- for (std::listPackage::Ptr::const_iterator it = packages.begin();
- it != packages.end();
- it++)
- {
- _store.insert(*it);
- }
- _resstore_loaded[kind] = true;
- }
- else
- {
- if ( isStorageEnabled() )
- {
- // resolvables stored in the zypp storage database
- std::listResObject::Ptr resolvables = _storage.storedObjects(kind);
- for (std::listResObject::Ptr::iterator it = resolvables.begin();
- it != resolvables.end();
- it++)
- {
- _store.insert(*it);
- }
- }
- else
- {
- WAR << "storage target not enabled" << std::endl;
- }
- _resstore_loaded[kind] = true;
- } // end switch
+ // FIXME remove this
}
ResStore::resfilter_const_iterator TargetImpl::byKindBegin( const ResObject::Kind & kind_r ) const
@@ -369,25 +376,12 @@
const ResStore & TargetImpl::resolvables()
{
- loadKindResolvables( ResTraitszypp::Patch::kind );
- loadKindResolvables( ResTraitszypp::Selection::kind );
- loadKindResolvables( ResTraitszypp::Pattern::kind );
- loadKindResolvables( ResTraitszypp::Product::kind );
- loadKindResolvables( ResTraitszypp::Language::kind );
- loadKindResolvables( ResTraitszypp::Package::kind );
return _store;
}
void TargetImpl::reset()
{
- // make this smarter later
- _store.clear();
- _resstore_loaded[ResTraitszypp::Patch::kind] = false;
- _resstore_loaded[ResTraitszypp::Selection::kind] = false;
- _resstore_loaded[ResTraitszypp::Pattern::kind] = false;
- _resstore_loaded[ResTraitszypp::Product::kind] = false;
- _resstore_loaded[ResTraitszypp::Language::kind] = false;
- _resstore_loaded[ResTraitszypp::Package::kind] = false;
+ // FIXME remove
}
ZYppCommitResult TargetImpl::commit( ResPool pool_r, const ZYppCommitPolicy & policy_rX )
@@ -604,92 +598,85 @@
}
else if (!policy_r.dryRun()) // other resolvables (non-Package)
{
- if ( isStorageEnabled() )
+ if (it->status().isToBeInstalled())
{
- if (it->status().isToBeInstalled())
- {
- // Process OBSOLETES and remove them from store.
- obsoleteMatchesFromStorage( _storage, pool_r, *it );
+ // Process OBSOLETES and remove them from store.
+ obsoleteMatchesFromStorage( pool_r, *it );
- bool success = false;
- try
+ bool success = false;
+ try
+ {
+ if (isKind<Message>(it->resolvable()))
{
- if (isKind<Message>(it->resolvable()))
- {
- Message::constPtr m = dynamic_pointer_cast<const Message>(it->resolvable());
- std::string text = m->text().asString();
+ Message::constPtr m = dynamic_pointer_cast<const Message>(it->resolvable());
+ std::string text = m->text().asString();
- callback::SendReporttarget::MessageResolvableReport report;
+ callback::SendReporttarget::MessageResolvableReport report;
- report->show( m );
+ report->show( m );
- MIL << "Displaying the text '" << text << "'" << endl;
- }
- else if (isKind<Script>(it->resolvable()))
- {
- ExecuteDoScript( access, asKind<Script>(it->resolvable()), _storage );
- }
- else if (!isKind<Atom>(it->resolvable())) // atoms are re-created from the patch data, no need to save them
+ MIL << "Displaying the text '" << text << "'" << endl;
+ }
+ else if (isKind<Script>(it->resolvable()))
+ {
+ ExecuteDoScript( access, asKind<Script>(it->resolvable()));
+ }
+ else if (!isKind<Atom>(it->resolvable())) // atoms are re-created from the patch data, no need to save them
+ {
+ // #160792 do not just add, also remove older versions
+ if (true) // !installOnly - only on Package?!
{
- // #160792 do not just add, also remove older versions
- if (true) // !installOnly - only on Package?!
+ // this would delete the same item over and over
+ //for (PoolItem old = Helper::findInstalledItem (pool_r, *it); old; )
+ #warning REMOVE ALL OLD VERSIONS AND NOT JUST ONE
+ PoolItem old = Helper::findInstalledItem (pool_r, *it);
+ if (old)
{
- // this would delete the same item over and over
- //for (PoolItem old = Helper::findInstalledItem (pool_r, *it); old; )
-#warning REMOVE ALL OLD VERSIONS AND NOT JUST ONE
- PoolItem old = Helper::findInstalledItem (pool_r, *it);
- if (old)
- {
- _storage.deleteObject(old.resolvable());
- }
+ // FIXME _storage.deleteObject(old.resolvable());
}
- _storage.storeObject(it->resolvable());
}
- success = true;
+ // FIXME _storage.storeObject(it->resolvable());
}
- catch (Exception & excpt_r)
+ success = true;
+ }
+ catch (Exception & excpt_r)
+ {
+ ZYPP_CAUGHT(excpt_r);
+ WAR << "Install of Resolvable from storage failed" << endl;
+ }
+ if (success)
+ it->status().resetTransact( ResStatus::USER );
+ }
+ else
+ { // isToBeUninstalled
+ bool success = false;
+ try
+ {
+ if (isKind<Atom>(it->resolvable()))
{
- ZYPP_CAUGHT(excpt_r);
- WAR << "Install of Resolvable from storage failed" << endl;
+ DBG << "Uninstalling atom - no-op" << endl;
}
- if (success)
- it->status().resetTransact( ResStatus::USER );
- }
- else
- { // isToBeUninstalled
- bool success = false;
- try
+ else if (isKind<Message>(it->resolvable()))
{
- if (isKind<Atom>(it->resolvable()))
- {
- DBG << "Uninstalling atom - no-op" << endl;
- }
- else if (isKind<Message>(it->resolvable()))
- {
- DBG << "Uninstalling message - no-op" << endl;
- }
- else if (isKind<Script>(it->resolvable()))
- {
- ExecuteUndoScript( access, asKind<Script>(it->resolvable()), _storage );
- }
- else
- {
- _storage.deleteObject(it->resolvable());
- }
- success = true;
+ DBG << "Uninstalling message - no-op" << endl;
}
- catch (Exception & excpt_r)
+ else if (isKind<Script>(it->resolvable()))
{
- ZYPP_CAUGHT(excpt_r);
- WAR << "Uninstall of Resolvable from storage failed" << endl;
+ ExecuteUndoScript( access, asKind<Script>(it->resolvable()));
}
- if (success)
- it->status().resetTransact( ResStatus::USER );
+ else
+ {
+ //FIXME _storage.deleteObject(it->resolvable());
+ }
+ success = true;
}
- }
- else
- {
- WAR << "storage target disabled" << std::endl;
+ catch (Exception & excpt_r)
+ {
+ ZYPP_CAUGHT(excpt_r);
+ WAR << "Uninstall of Resolvable from storage failed" << endl;
+ }
+ if (success)
+ it->status().resetTransact( ResStatus::USER );
}
} // other resolvables
@@ -755,9 +742,12 @@
ts_rpm = _rpm.timestamp();
- if ( isStorageEnabled() )
- ts_store = _storage.timestamp();
-
+ PathInfo store_info = PathInfo( _root + Pathname(ZYPP_DB) + "_store.solv" );
+ if (store_info.isExist() )
+ ts_store = Date(store_info.mtime());
+ else
+ ts_store = Date::now();
+
if ( ts_rpm > ts_store )
{
return ts_rpm;
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h?rev=8445&r1=8444&r2=8445&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/target/TargetImpl.h Sat Feb 2 04:32:24 2008
@@ -69,6 +69,8 @@
/** Null implementation */
static TargetImpl_Ptr nullimpl();
+ void load();
+
public:
/** All resolvables in the target. */
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org