add all files as PROVIDES to package (#164731)
authorKlaus Kaempf <kkaempf@suse.de>
Mon, 10 Apr 2006 11:11:55 +0000 (11:11 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Mon, 10 Apr 2006 11:11:55 +0000 (11:11 +0000)
zypp/source/yum/YUMSourceImpl.cc

index 848c5792543a58c51129f5a61097635b711d4803..6d1f3a2eb79d5b5c45d98bba26333e728a6d3670 100644 (file)
@@ -479,10 +479,10 @@ namespace zypp
                  source_r,
                  **prim,
                  found_files != files_data.end()
-                   ? *found_files->second
+                   ? *(found_files->second)
                    : filelist_empty,
                  found_other != other_data.end()
-                   ? *found_other->second
+                   ? *(found_other->second)
                     : other_empty,
                  impl
                );
@@ -714,6 +714,17 @@ namespace zypp
     {
       impl = new YUMPackageImpl( source_r, parsed, filelist, other );
 
+      Dependencies deps( createDependencies( parsed, ResTraits<Package>::kind ) );
+
+      CapFactory f;
+
+       for (std::list<FileData>::const_iterator it = filelist.files.begin();
+            it != filelist.files.end();
+            it++)
+       {
+           deps[Dep::PROVIDES].insert( f.parse( ResTraits<Package>::kind, it->name ) );
+       }
+
       Arch arch;
       if (!parsed.arch.empty())
         arch = Arch(parsed.arch);
@@ -722,8 +733,7 @@ namespace zypp
       NVRAD dataCollect( parsed.name,
                         Edition( parsed.ver, parsed.rel, parsed.epoch ),
                         arch,
-                        createDependencies( parsed,
-                                          ResTraits<Package>::kind )
+                        deps
                       );
       Package::Ptr package = detail::makeResolvableFromImpl(
        dataCollect, impl