feeding rpm:entry kind attribute (default to "package") as 'refers'
authorJan Kupec <jkupec@suse.cz>
Tue, 22 May 2007 18:26:31 +0000 (18:26 +0000)
committerJan Kupec <jkupec@suse.cz>
Tue, 22 May 2007 18:26:31 +0000 (18:26 +0000)
argument to cap factory when reading dependencies

zypp/parser/yum/FileReaderBase.cc

index 92462926cb0f135886643dcdfe065fb5d515877c..d501d85fa13e34354fc8c855606e7641a8e0930c 100644 (file)
@@ -240,14 +240,22 @@ namespace zypp
           reader_r->getAttribute("rel").asString(),
           reader_r->getAttribute("epoch").asString()
         );
+        
+        string kind_str = reader_r->getAttribute("kind").asString();
+        Resolvable::Kind kind;
+        if (kind_str.empty())
+           kind = ResTraits<Package>::kind;
+        else
+          kind = Resolvable::Kind(kind_str); 
+          
 /*
         DBG << "got rpm:entry for " << _dtype << ": "
             << reader_r->getAttribute("name").asString()
-            << " " << edition << endl;
+            << " " << edition << " (" << kind << ")" << endl;
 */
         deps_r[_dtype].insert(
           zypp::capability::parse(
-            ResTraits<Package>::kind,
+            kind,
             reader_r->getAttribute("name").asString(),
             Rel(reader_r->getAttribute("flags").asString()),
             edition