changes
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 6 Oct 2006 09:56:34 +0000 (09:56 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 6 Oct 2006 09:56:34 +0000 (09:56 +0000)
devel/devel.dmacvicar/testbed.cc
package/libzypp.changes

index 7efda95..339184e 100644 (file)
 #include "zypp/SourceFactory.h"
 #include "testsuite/src/utils/TestUtils.h"
 #include "zypp/base/GzStream.h"
+#include "zypp/source/OnMediaLocation.h"
 
 using namespace std;
 using namespace zypp;
 using namespace zypp::detail;
 using namespace zypp::source;
 using namespace zypp::packagedelta;
-//using namespace DbXml;
 
-struct YUMSourceEventHandler
-{
-  YUMSourceEventHandler()
-  {}
-        
-  void operator()( int p )
-  {
-    std::cout << "\rProgress " << p << "               " << std::endl;
-  }
-};
 
 int main(int argc, char **argv)
 {
   try
   {
     ZYpp::Ptr z = getZYpp();
+   
+    source::OnMediaLocation oml;
+    oml.medianr( str::strtonum<unsigned>( "" ) )
+                            .filename( "rpm/blah.rpm" )
+                            .checksum( CheckSum( "sha1", "a7235c3ae45b353ceca8358160fe305d26b4d3dd" ) )
+                            .downloadsize( str::strtonum<ByteCount::SizeType>( "2506999" ) );
     
-    //PublicKey key("repomd.xml.key");
-    //cout << key << endl;
-    //z->initializeTarget("/");
-    
-    Pathname filename = "primary.xml";
-    //ifgzstream st ( argv[1] );
-    std::ifstream st ( argv[1] );
-    
-    if ( st.bad() )
-      ZYPP_THROW(Exception("archivo malo"));
-    
-    parser::ParserProgress::Ptr progress;
-    YUMSourceEventHandler npp;
-    progress.reset( new parser::ParserProgress( npp, PathInfo(filename).size()  ) );
-    
-    parser::yum::YUMPrimaryParser prim(st, "", progress);
-    for (; !prim.atEnd(); ++prim)
-    {
-      std::cout << "iteracion" << std::endl;
-      if (*prim == NULL) continue;      // incompatible arch detected during parsi
-    }    
+    MIL << oml << endl;
   }
   catch ( const Exception &e )
   {
index 522872b..47c3cf7 100644 (file)
@@ -1,4 +1,15 @@
 -------------------------------------------------------------------
+Fri Oct  6 11:55:11 CEST 2006 - dmacvicar@suse.de
+
+- Introduce a method to see if a source supports a 
+  kind of resolvable at that time, so we can
+  init a YUM source like factory but avoid parsing
+  it if it contains no patches. 
+- add TODO
+- zypp-checkpatches xml output
+- r4235
+
+-------------------------------------------------------------------
 Mon Oct  2 16:34:03 CEST 2006 - mvidner@suse.cz
 
 - added a CLI preview: zypper