Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10571 - /trunk/libzypp/devel/devel.ma/Main.cc
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Mon, 14 Jul 2008 11:38:03 -0000
  • Message-id: <20080714113804.02D0A34433@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Mon Jul 14 13:38:03 2008
New Revision: 10571

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

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

Modified: trunk/libzypp/devel/devel.ma/Main.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/devel/devel.ma/Main.cc?rev=10571&r1=10570&r2=10571&view=diff
==============================================================================
--- trunk/libzypp/devel/devel.ma/Main.cc (original)
+++ trunk/libzypp/devel/devel.ma/Main.cc Mon Jul 14 13:38:03 2008
@@ -11,6 +11,7 @@

#include "zypp/RepoManager.h"
#include "zypp/RepoInfo.h"
+#include "zypp/repo/PackageProvider.h"

#include "zypp/ResPoolProxy.h"

@@ -39,24 +40,18 @@
return true;
}

-void mksrc( const std::string & url, const std::string & alias )
+ManagedFile providePkg( const PoolItem & pi )
{
- 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 );
- }
+ Package::constPtr p = asKind<Package>( pi.resolvable() );
+ if ( ! pi )
+ return ManagedFile();
+
+ repo::RepoMediaAccess access;
+ std::list<Repository> repos;
+ repo::DeltaCandidates deltas( repos );
+ repo::PackageProvider pkgProvider( access, p, deltas );

- repoManager.loadFromCache( nrepo );
+ return pkgProvider.providePackage();
}

/******************************************************************
@@ -68,19 +63,27 @@
{
INT << "===[START]==========================================" << endl;

- ResPool pool( ResPool::instance() );
- sat::Pool satpool( sat::Pool::instance() );
+ RepoManager repoManager( makeRepoManager( sysRoot ) );
+ 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" );
+// 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" );
+// mksrc(
"iso:///?iso=openSUSE-10.3-GM-DVD9-BiArch-DVD1.iso&url=file:///schnell/CD-ARCHIVE/10.3/iso",
"10.3.iso", repoManager );
+ mksrc( "file:///Local/SRC/test/", "test", repoManager );

USR << "pool: " << pool << endl;
+ PoolItem pi ( getPi<Package>("BitTorrent-curses", Edition("4.0.3-115"),
Arch_i586 ) );
+ MIL << pi << endl;
+ if ( pi )
+ {
+ providePkg( pi );
+ }

- 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 )
+ if ( 0 )
{
vdumpPoolStats( USR << "Transacting:"<< endl,
make_filter_begin<resfilter::ByTransact>(pool),

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

< Previous Next >
This Thread
  • No further messages