#include "zypp/RepoManager.h"
#include "zypp/RepoInfo.h"
+#include "zypp/ui/PatchContents.h"
+
using namespace std;
using namespace zypp;
using namespace zypp::functor;
{
bool operator()( const PoolItem & obj_r )
{
- handle( asKind<Package>( obj_r ) );
- //handle( asKind<Pattern>( obj_r ) );
- //handle( asKind<Product>( obj_r ) );
+ //handle( asKind<Package>( obj_r ) );
+ //handle( asKind<Patch>( obj_r ) );
+ handle( asKind<Pattern>( obj_r ) );
+ handle( asKind<Product>( obj_r ) );
return true;
}
if ( !p )
return;
- //MIL << p->diskusage() << endl;
+ MIL << p->diskusage() << endl;
+ }
+
+ void handle( const Patch_constPtr & p )
+ {
+ if ( !p )
+ return;
}
void handle( const Pattern_constPtr & p )
if ( !p )
return;
- MIL << p << endl;
+ if ( p->vendor().empty() )
+ ERR << p << endl;
+ else if ( p->vendor() == "SUSE (assumed)" )
+ SEC << p << endl;
}
void handle( const Product_constPtr & p )
if ( !p )
return;
- ERR << p << endl;
- ERR << p->type() << endl;
+ USR << p << endl;
+ USR << p->vendor() << endl;
+ USR << p->type() << endl;
}
template<class _C>
struct MediaChangeReceive : public callback::ReceiveReport<media::MediaChangeReport>
{
- virtual Action requestMedia( Repository source
+ virtual Action requestMedia( Url & source
, unsigned mediumNr
, Error error
, const std::string & description )
{ /////////////////////////////////////////////////////////////////
+ void Vtst( const std::string & lhs, const std::string & rhs )
+ {
+ (VendorAttr::instance().equivalent( lhs, rhs )?MIL:ERR) << lhs << " <==> "<< rhs << endl;
+
+ }
/////////////////////////////////////////////////////////////////
} // namespace zypp
{
//zypp::base::LogControl::instance().logfile( "log.restrict" );
INT << "===[START]==========================================" << endl;
-
- {
- AutoDispose<int> fd( 0 );
- SEC << fd << endl;
- fd = ::open( "/tmp/foo", 1 );
- SEC << fd << endl;
-
- if ( fd == -1 )
- ; // error report
- else
- fd.setDispose( ::close );
- }
- return 0;
+ setenv( "ZYPP_CONF", "/Local/ROOT/zypp.conf", 1 );
DigestReceive foo;
KeyRingSignalsReceive baa;
USR << "pool: " << pool << endl;
SEC << pool.knownRepositoriesSize() << endl;
- if ( 0 )
+ if ( 1 )
{
{
zypp::base::LogControl::TmpLineWriter shutUp;
- getZYpp()->initTarget( sysRoot );
+ //getZYpp()->initTarget( sysRoot );
+ getZYpp()->initTarget( "/" );
}
MIL << "Added target: " << pool << endl;
}
- INT << getZYpp()->diskUsage() << endl;
-
std::for_each( pool.begin(), pool.end(), Xprint() );
///////////////////////////////////////////////////////////////////