Detect and compile with rpm 4.7 (bnc #444211)
[platform/upstream/libzypp.git] / zypp / target / rpm / librpmDb.cv3.cc
index 228b833..65c1c41 100644 (file)
@@ -9,6 +9,7 @@
 /** \file zypp/target/rpm/librpmDb.cv3.cc
  *
 */
+
 #include "librpm.h"
 
 #include <iostream>
@@ -164,7 +165,7 @@ static void compressFilelist(Header h)
   const char ** baseNames;
   int_32 * dirIndexes;
   rpmTagType fnt;
-  int count;
+  rpm_count_t count;
   int i, xx;
   int dirIndex = -1;
 
@@ -272,7 +273,7 @@ void providePackageNVR(Header h)
   const char ** providesEVR = NULL;
   rpmTagType pnt, pvt;
   int_32 * provideFlags = NULL;
-  int providesCount;
+  rpm_count_t providesCount;
   int i, xx;
   int bingo = 1;
 
@@ -307,7 +308,7 @@ void providePackageNVR(Header h)
     providesEVR = (const char **)hgePtr;
     for (i = 0; i < providesCount; i++)
     {
-      char * vdummy = "";
+      const char * vdummy = "";
       int_32 fdummy = RPMSENSE_ANY;
       xx = headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE,
                                   &vdummy, 1);
@@ -407,7 +408,7 @@ void internal_convertV3toV4( const Pathname & v3db_r, const librpmDb::constPtr &
       ::rpmdbClose( db );
     }
     Fclose( fd );
-    ZYPP_THROW(RpmDbOpenException(root, Pathname(string(db->db_root))));
+    ZYPP_THROW(RpmDbOpenException(root, v4db_r->dbPath()));
   }
 
   // Check ammount of packages to process.