- initial rpm 4.4.4 support
authorpmatilai <pmatilai>
Mon, 16 Jan 2006 23:22:11 +0000 (23:22 +0000)
committerpmatilai <pmatilai>
Mon, 16 Jan 2006 23:22:11 +0000 (23:22 +0000)
apt-pkg/rpm/rpmlistparser.cc
apt-pkg/rpm/rpmsrcrecords.cc

index 10e5e29..8d034c7 100644 (file)
@@ -393,10 +393,31 @@ bool rpmListParser::ParseDepends(pkgCache::VerIterator Ver,
         else
            Type = pkgCache::Dep::Depends;
       }
+#if RPM_VERSION >= 0x040404
+      if (namel[i][0] == 'g' && strncmp(namel[i], "getconf", 7) == 0)
+      {
+        rpmds getconfProv = NULL;
+        rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME,
+                               namel[i], verl?verl[i]:NULL, flagl[i]);
+        rpmdsGetconf(&getconfProv, NULL);
+        int res = rpmdsSearch(getconfProv, ds) >= 0;
+        rpmdsFree(ds);
+        rpmdsFree(getconfProv);
+        if (res) continue;
+      }
+#endif
       
-      if (namel[i][0] == 'r' && strncmp(namel[i], "rpmlib", 6) == 0) 
+      if (namel[i][0] == 'r' && strncmp(namel[i], "rpmlib", 6) == 0)
       {
-#if RPM_VERSION >= 0x040100
+#if RPM_VERSION >= 0x040404
+        rpmds rpmlibProv = NULL;
+        rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME,
+                               namel[i], verl?verl[i]:NULL, flagl[i]);
+        rpmdsRpmlib(&rpmlibProv, NULL);
+        int res = rpmdsSearch(rpmlibProv, ds) >= 0;
+        rpmdsFree(ds);
+        rpmdsFree(rpmlibProv);
+#elif RPM_VERSION >= 0x040100
         rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME,
                                namel[i], verl?verl[i]:NULL, flagl[i]);
         int res = rpmCheckRpmlibProvides(ds);
index d45afe3..49256d4 100644 (file)
@@ -436,9 +436,31 @@ bool rpmSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec>
       
       for (int i = 0; i < count; i++) 
       {
+#if RPM_VERSION >= 0x040404
+         if (namel[i][0] == 'g' && strncmp(namel[i], "getconf", 7) == 0)
+         {
+            rpmds getconfProv = NULL;
+            rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME,
+                                   namel[i], verl?verl[i]:NULL, flagl[i]);
+            rpmdsGetconf(&getconfProv, NULL);
+            int res = rpmdsSearch(getconfProv, ds) >= 0;
+            rpmdsFree(ds);
+            rpmdsFree(getconfProv);
+            if (res) continue;
+         }
+#endif
         if (strncmp(namel[i], "rpmlib", 6) == 0) 
         {
-#if RPM_VERSION >= 0x040100
+#if RPM_VERSION >= 0x040404
+           rpmds rpmlibProv = NULL;
+           rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME,
+                                  namel[i], verl?verl[i]:NULL, flagl[i]);
+           rpmdsRpmlib(&rpmlibProv, NULL);
+           rpmdsSearch(rpmlibProv, ds);
+           int res = rpmdsResult(ds);
+           rpmdsFree(ds);
+           rpmdsFree(rpmlibProv);
+#elif RPM_VERSION >= 0x040100
            rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME,
                                   namel[i], verl?verl[i]:NULL, flagl[i]);
            int res = rpmCheckRpmlibProvides(ds);