fix filelist for installed packages (bnc#392544)
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 22 May 2008 00:24:52 +0000 (00:24 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 22 May 2008 00:24:52 +0000 (00:24 +0000)
package/libzypp.changes
zypp/Package.cc

index 1ad6813..decbac0 100644 (file)
@@ -1,4 +1,9 @@
 -------------------------------------------------------------------
+Thu May 22 02:22:29 CEST 2008 - dmacvicar@suse.de
+
+- fix filelist for installed packages (bnc#392544)
+
+-------------------------------------------------------------------
 Wed May 21 13:50:00 CEST 2008 - dmacvicar@suse.de
 
 - deprecate Repository::name() and use alias() to
index f4689e6..92b7cd0 100644 (file)
@@ -10,6 +10,7 @@
  *
 */
 #include "zypp/Package.h"
+#include "zypp/sat/LookupAttr.h"
 
 using namespace std;
 
@@ -86,10 +87,16 @@ namespace zypp
     return ret;
   }
 
-  /** */
-#warning DUMMY filenames
   std::list<std::string> Package::filenames() const
-  { return std::list<std::string>(); }
+  { 
+    std::list<std::string> files; 
+    sat::LookupAttr q( sat::SolvAttr::filelist, *this );
+    for_( it, q.begin(), q.end() )
+    {
+        files.push_back(it.asString());
+    }
+    return files;
+  }
 
   CheckSum Package::checksum() const
   { return lookupCheckSumAttribute( sat::SolvAttr::checksum ); }