Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10527 - in /trunk/libzypp/devel/devel.ma: Main.cc Tools.h
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 09 Jul 2008 16:07:35 -0000
  • Message-id: <20080709160735.8F1B02F138@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Jul 9 18:07:35 2008
New Revision: 10527

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10527&view=rev
Log:
backup

Modified:
trunk/libzypp/devel/devel.ma/Main.cc
trunk/libzypp/devel/devel.ma/Tools.h

Modified: trunk/libzypp/devel/devel.ma/Main.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Main.cc?rev=10527&r1=10526&r2=10527&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Main.cc (original)
+++ trunk/libzypp/devel/devel.ma/Main.cc Wed Jul 9 18:07:35 2008
@@ -1,4 +1,4 @@
-#include <iostream>
+#include "Tools.h"

#include "zypp/base/Easy.h"
#include "zypp/base/LogTools.h"
@@ -8,7 +8,11 @@
#include "zypp/base/PtrTypes.h"

#include "zypp/TmpPath.h"
+
#include "zypp/RepoManager.h"
+#include "zypp/RepoInfo.h"
+
+#include "zypp/ResPoolProxy.h"

using std::endl;
using namespace zypp;
@@ -19,6 +23,42 @@

///////////////////////////////////////////////////////////////////

+bool solve()
+{
+ bool rres = false;
+ {
+ //zypp::base::LogControl::TmpLineWriter shutUp;
+ rres = getZYpp()->resolver()->resolvePool();
+ }
+ if ( ! rres )
+ {
+ ERR << "resolve " << rres << endl;
+ return false;
+ }
+ MIL << "resolve " << rres << endl;
+ return true;
+}
+
+void mksrc( const std::string & url, const std::string & alias )
+{
+ RepoManager repoManager( makeRepoManager( sysRoot ) );
+
+ RepoInfo nrepo;
+ nrepo
+ .setAlias( alias )
+ .setName( alias )
+ .setEnabled( true )
+ .setAutorefresh( false )
+ .addBaseUrl( Url(url) );
+
+ if ( ! repoManager.isCached( nrepo ) )
+ {
+ repoManager.buildCache( nrepo );
+ }
+
+ repoManager.loadFromCache( nrepo );
+}
+
/******************************************************************
**
** FUNCTION NAME : main
@@ -28,21 +68,29 @@
{
INT << "===[START]==========================================" << endl;

- //TmpDir tmp_dir;
- //KeyRing keyring( tmp_dir.path() );
+ ResPool pool( ResPool::instance() );
+ sat::Pool satpool( sat::Pool::instance() );
+
+ mksrc(
"file:///schnell/CD-ARCHIVE/SLES10/SLE-10-SP1/SLES-10-SP1-GM/ia64/DVD1", "SLE"
);
+ mksrc( "file:///mounts/dist/install/SLP/SLES-10-SP2-AS-LATEST/i386/CD1",
"factorytest" );
+
+ USR << "pool: " << pool << endl;

+ getSel<Product>( "SUSE_SLES_SP1" )->setStatus( ui::S_Install );
+ //getSel<Pattern>( "basesystem" )->setStatus( ui::S_Install );
+ //getSel<Pattern>( "slesas-ofed-base" )->setStatus( ui::S_Install );
+
+ if ( 1 )
{
- Measure x( "INIT TARGET" );
- {
- {
- //zypp::base::LogControl::TmpLineWriter shutUp;
- getZYpp()->initializeTarget( sysRoot );
- }
- //getZYpp()->target()->load();
- }
+ vdumpPoolStats( USR << "Transacting:"<< endl,
+ make_filter_begin<resfilter::ByTransact>(pool),
+ make_filter_end<resfilter::ByTransact>(pool) ) << endl;
+ solve();
+ vdumpPoolStats( USR << "Transacting:"<< endl,
+ make_filter_begin<resfilter::ByTransact>(pool),
+ make_filter_end<resfilter::ByTransact>(pool) ) << endl;
}

-
INT << "===[END]============================================" << endl <<
endl;
return 0;
}

Modified: trunk/libzypp/devel/devel.ma/Tools.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Tools.h?rev=10527&r1=10526&r2=10527&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Tools.h (original)
+++ trunk/libzypp/devel/devel.ma/Tools.h Wed Jul 9 18:07:35 2008
@@ -23,6 +23,7 @@
#include "zypp/ZYppFactory.h"
#include "zypp/ResPool.h"
#include "zypp/ResPoolProxy.h"
+#include "zypp/ui/Selectable.h"
#include <zypp/Repository.h>
#include <zypp/RepoManager.h>


--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages