rpms/apt/devel apt-0.5.15lorg3.94-makebuild.patch,NONE,1.1

Axel Thimm (athimm) fedora-extras-commits at redhat.com
Fri Aug 1 13:46:59 UTC 2008


Author: athimm

Update of /cvs/extras/rpms/apt/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32200

Added Files:
	apt-0.5.15lorg3.94-makebuild.patch 
Log Message:
Trying to build against latest rpm.

apt-0.5.15lorg3.94-makebuild.patch:

--- NEW FILE apt-0.5.15lorg3.94-makebuild.patch ---
diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.cc apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.cc
--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.cc	2008-01-11 19:09:30.000000000 +0000
+++ apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.cc	2008-08-01 11:02:07.000000000 +0100
@@ -1,5 +1,6 @@
 #include <map>
 #include <stdio.h>
+#define _RPM_4_4_COMPAT
 #include <rpm/rpmlib.h>
 #include <apti18n.h>
 
@@ -36,8 +37,8 @@
 void * rpmCallback(const void * arg, 
 #endif
 		   const rpmCallbackType what,
-                   const rpmCallbackSize_t amount,
-                   const rpmCallbackSize_t total,
+                   const rpm_loff_t amount,
+                   const rpm_loff_t total,
 		   const void * pkgKey, void * data)
 
 {
diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.h apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.h
--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/aptcallback.h	2008-01-11 19:09:30.000000000 +0000
+++ apt-0.5.15lorg3.94/apt-pkg/rpm/aptcallback.h	2008-08-01 11:01:32.000000000 +0100
@@ -16,8 +16,8 @@
 void * rpmCallback(const void * arg, 
 #endif
 			const rpmCallbackType what,
-                        const rpmCallbackSize_t amount,
-                        const rpmCallbackSize_t total,
+                        const rpm_loff_t amount,
+                        const rpm_loff_t total,
 			const void * pkgKey, void * data);
 
 #endif /* _APTRPM_RPMCALLBACK_H */
diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.cc apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.cc
--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.cc	2008-01-11 19:09:34.000000000 +0000
+++ apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.cc	2008-07-28 12:06:19.000000000 +0100
@@ -53,13 +53,7 @@
 #include <rpm/rpmds.h>
 #include <rpm/rpmfi.h>
 
-// XXX we'd need to include rpmsq.h but it's not valid C++ in many
-// existing rpm versions so just declare rpmsqCaught extern.. sigh.
-#if 1
-extern sigset_t rpmsqCaught;
-#else
 #include <rpm/rpmsq.h>
-#endif
 
 #define rpmxxInitIterator(a,b,c,d) rpmtsInitIterator(a,(rpmTag)b,c,d)
 #else
@@ -138,7 +132,7 @@
    return false;
 }
 
-bool RPMHandler::InternalDep(const char *name, const char *ver, int_32 flag) 
+bool RPMHandler::InternalDep(const char *name, const char *ver, rpmsenseFlags flag) 
 {
    if (strncmp(name, "rpmlib(", strlen("rpmlib(")) == 0) {
 #if RPM_VERSION >= 0x040100
@@ -247,7 +241,7 @@
    return false; 
 }
 
-bool RPMHandler::PutDep(const char *name, const char *ver, int_32 flags, 
+bool RPMHandler::PutDep(const char *name, const char *ver, rpmsenseFlags flags, 
 			unsigned int Type, vector<Dependency*> &Deps)
 {
    if (InternalDep(name, ver, flags) == true) {
@@ -283,7 +277,7 @@
 {
    char str[512] = "";
    rpm_count_t count;
-   rpm_tagtype_t type;
+   rpmTagType type;
    rpm_data_t val;
    int_32 *epoch;
    assert(HeaderP != NULL);
@@ -298,7 +292,7 @@
 off_t RPMHdrHandler::GetITag(rpmTag Tag)
 {
    rpm_count_t count;
-   rpm_tagtype_t type;
+   rpmTagType type;
    rpm_data_t val;
    int_32 *num;
    assert(HeaderP != NULL);
@@ -313,7 +307,7 @@
    const char *str;
    rpm_data_t val;
    rpm_count_t count;
-   rpm_tagtype_t type;
+   rpmTagType type;
    assert(HeaderP != NULL);
    int rc = headerGetEntry(HeaderP, Tag,
 			   &type, &val, &count);
@@ -462,7 +456,7 @@
    char **authorl = NULL;
    char **entryl = NULL;
    rpm_data_t timeval, authorval, entryval;
-   rpm_tagtype_t type;
+   rpmTagType type;
    rpm_count_t count;
    int res;
 
@@ -870,11 +864,11 @@
     * There's a WTF involved as rpmCheckSignals() actually calls exit()
     * so we shouldn't even get here really?!
     */
-   if (sigismember(&rpmsqCaught, SIGINT) || 
-       sigismember(&rpmsqCaught, SIGQUIT) ||
-       sigismember(&rpmsqCaught, SIGHUP) ||
-       sigismember(&rpmsqCaught, SIGTERM) ||
-       sigismember(&rpmsqCaught, SIGPIPE)) {
+   if (rpmsqIsCaught(SIGINT) || 
+       rpmsqIsCaught(SIGQUIT) ||
+       rpmsqIsCaught(SIGHUP) ||
+       rpmsqIsCaught(SIGTERM) ||
+       rpmsqIsCaught(SIGPIPE)) {
       /* do nothing */
    } else if (Handler != NULL) {
       rpmtsFree(Handler);
@@ -1265,7 +1259,7 @@
       return true;
    }
    for (xmlNode *n = prco->children; n; n = n->next) {
-      int_32 RpmOp = 0;
+      int32_t RpmOp = 0;
       string deptype, depver;
       xmlChar *depname, *flags;
       if ((depname = xmlGetProp(n, (xmlChar*)"name")) == NULL) continue;
@@ -1318,7 +1312,7 @@
 	    xmlFree(pre);
 	 }
       }
-      PutDep((char*)depname, depver.c_str(), RpmOp, Type, Deps);
+      PutDep((char*)depname, depver.c_str(), (rpmsenseFlags)RpmOp, Type, Deps);
       xmlFree(depname);
    }
    return true;
@@ -1741,7 +1735,7 @@
 	 }
       }
       string depname = prco->GetCol("name");
-      PutDep(depname.c_str(), depver.c_str(), RpmOp, Type, Deps);
+      PutDep(depname.c_str(), depver.c_str(), (rpmsenseFlags)RpmOp, Type, Deps);
    }
    delete prco;
    return true;
diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.h apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.h
--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmhandler.h	2008-01-11 19:09:30.000000000 +0000
+++ apt-0.5.15lorg3.94/apt-pkg/rpm/rpmhandler.h	2008-07-28 12:06:20.000000000 +0100
@@ -21,6 +21,7 @@
 #include "sqlite.h"
 #endif
 
+#define _RPM_4_4_COMPAT
 #include <rpm/rpmlib.h>
 #include <rpm/rpmmacro.h>
 
@@ -63,8 +64,8 @@
    string ID;
 
    unsigned int DepOp(int_32 rpmflags);
-   bool InternalDep(const char *name, const char *ver, int_32 flag);
-   bool PutDep(const char *name, const char *ver, int_32 flags,
+   bool InternalDep(const char *name, const char *ver, rpmsenseFlags flag);
+   bool PutDep(const char *name, const char *ver, rpmsenseFlags flags,
                unsigned int type, vector<Dependency*> &Deps);
 
    public:
diff -ru apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmversion.cc apt-0.5.15lorg3.94/apt-pkg/rpm/rpmversion.cc
--- apt-0.5.15lorg3.94.orig/apt-pkg/rpm/rpmversion.cc	2008-01-11 19:09:34.000000000 +0000
+++ apt-0.5.15lorg3.94/apt-pkg/rpm/rpmversion.cc	2008-07-28 12:06:19.000000000 +0100
@@ -165,7 +165,7 @@
 bool rpmVersioningSystem::CheckDep(const char *PkgVer,
 				   int Op,const char *DepVer)
 {
-   int PkgFlags = RPMSENSE_EQUAL;
+   rpmsenseFlags PkgFlags = RPMSENSE_EQUAL;
    int DepFlags = 0;
    bool invert = false;
    int rc;
@@ -204,7 +204,7 @@
 
 #if RPM_VERSION >= 0x040100
    rpmds pds = rpmdsSingle(RPMTAG_PROVIDENAME, "", PkgVer, PkgFlags);
-   rpmds dds = rpmdsSingle(RPMTAG_REQUIRENAME, "", DepVer, DepFlags);
+   rpmds dds = rpmdsSingle(RPMTAG_REQUIRENAME, "", DepVer, (rpmsenseFlags)DepFlags);
 #if RPM_VERSION >= 0x040201
    rpmdsSetNoPromote(pds, _rpmds_nopromote);
    rpmdsSetNoPromote(dds, _rpmds_nopromote);
@@ -213,7 +213,7 @@
    rpmdsFree(pds);
    rpmdsFree(dds);
 #else 
-   rc = rpmRangesOverlap("", PkgVer, PkgFlags, "", DepVer, DepFlags);
+   rc = rpmRangesOverlap("", PkgVer, PkgFlags, "", DepVer, (rpmsenseFlags)DepFlags);
 #endif
     
    return (!invert && rc) || (invert && !rc);
diff -ru apt-0.5.15lorg3.94.orig/tools/cached_md5.cc apt-0.5.15lorg3.94/tools/cached_md5.cc
--- apt-0.5.15lorg3.94.orig/tools/cached_md5.cc	2008-07-28 12:06:28.000000000 +0100
+++ apt-0.5.15lorg3.94/tools/cached_md5.cc	2008-07-28 12:06:19.000000000 +0100
@@ -6,6 +6,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
+#define _RPM_4_4_COMPAT
 #include <rpm/rpmlib.h>
 #include <stdlib.h>
 #include <string.h>
diff -ru apt-0.5.15lorg3.94.orig/tools/genpkglist.cc apt-0.5.15lorg3.94/tools/genpkglist.cc
--- apt-0.5.15lorg3.94.orig/tools/genpkglist.cc	2008-07-28 12:06:28.000000000 +0100
+++ apt-0.5.15lorg3.94/tools/genpkglist.cc	2008-07-28 12:06:19.000000000 +0100
@@ -6,6 +6,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
+#define _RPM_4_4_COMPAT
 #include <rpm/rpmlib.h>
 #include <stdlib.h>
 #include <string.h>
@@ -32,12 +33,11 @@
 #ifndef RPM_HAVE_DATA_T
 typedef void * rpm_data_t;
 typedef int_32 rpm_count_t;
-typedef int_32 rpm_tagtype_t;
 #endif
 
 #define CRPMTAG_TIMESTAMP   1012345
 
-int tags[] =  {
+rpmTag tags[] =  {
        RPMTAG_NAME, 
        RPMTAG_EPOCH,
        RPMTAG_VERSION,
@@ -52,7 +52,7 @@
        
        RPMTAG_DESCRIPTION, 
        RPMTAG_SUMMARY, 
-       /*RPMTAG_HEADERI18NTABLE*/ HEADER_I18NTABLE,
+       RPMTAG_HEADERI18NTABLE,
        
        RPMTAG_REQUIREFLAGS, 
        RPMTAG_REQUIRENAME,
@@ -72,7 +72,7 @@
 
        RPMTAG_FILEFLAGS
 };
-int numTags = sizeof(tags) / sizeof(int);
+int numTags = sizeof(tags) / sizeof(rpmTag);
 
 
 
@@ -105,7 +105,7 @@
 {
    rpm_count_t i, i1, i2;
    
-   rpm_tagtype_t type1, type2, type3;
+   rpmTagType type1, type2, type3;
    rpm_count_t count1, count2, count3;
    char **dirnames = NULL, **basenames = NULL;
    int_32 *dirindexes = NULL;
@@ -230,8 +230,8 @@
 #if RPM_VERSION >= 0x040000
 // No prototype from rpm after 4.0.
 extern "C" {
-int headerGetRawEntry(Header h, int_32 tag, int_32 * type,
-		      void *p, int_32 *c);
+int headerGetRawEntry(Header h, rpmTag tag, rpmTagType* type,
+		      void *p, rpm_count_t *c);
 }
 #endif
 
@@ -247,7 +247,8 @@
    
    // the std tags
    for (i = 0; i < numTags; i++) {
-      int_32 type, count;
+      rpmTagType type;
+      rpm_count_t count;
       void *data;
       int res;
       
@@ -260,7 +261,7 @@
    }
  
    if (fullFileList) {
-      rpm_tagtype_t type1, type2, type3;
+      rpmTagType type1, type2, type3;
       rpm_count_t count1, count2, count3;
       char **dnames, **bnames, **dindexes;
       rpm_data_t dnameval, bnameval, dindexval;
@@ -288,7 +289,7 @@
    
    // update index of srpms
    if (idxfile) {
-      rpm_tagtype_t type;
+      rpmTagType type;
       rpm_count_t count;
       rpm_data_t srpmval, nameval;
       char *srpm, *name;
diff -ru apt-0.5.15lorg3.94.orig/tools/gensrclist.cc apt-0.5.15lorg3.94/tools/gensrclist.cc
--- apt-0.5.15lorg3.94.orig/tools/gensrclist.cc	2008-07-28 12:06:28.000000000 +0100
+++ apt-0.5.15lorg3.94/tools/gensrclist.cc	2008-07-28 12:06:19.000000000 +0100
@@ -6,6 +6,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
+#define _RPM_4_4_COMPAT
 #include <rpm/rpmlib.h>
 #include <stdlib.h>
 #include <string.h>
@@ -32,7 +33,7 @@
  
 using namespace std;
 
-int tags[] =  {
+rpmTag tags[] =  {
        RPMTAG_NAME,
        RPMTAG_EPOCH,
        RPMTAG_VERSION,
@@ -47,13 +48,13 @@
        
        RPMTAG_DESCRIPTION, 
        RPMTAG_SUMMARY, 
-       /*RPMTAG_HEADERI18NTABLE*/ HEADER_I18NTABLE,
+       RPMTAG_HEADERI18NTABLE,
        
        RPMTAG_REQUIREFLAGS, 
        RPMTAG_REQUIRENAME,
        RPMTAG_REQUIREVERSION
 };
-int numTags = sizeof(tags) / sizeof(int);
+int numTags = sizeof(tags) / sizeof(rpmTag);
 
 #if defined(__APPLE__) || defined(__FREEBSD__)
 int selectDirent(struct dirent *ent)
@@ -139,8 +140,8 @@
 #if RPM_VERSION >= 0x040000
 extern "C" {
 // No prototype from rpm after 4.0.
-int headerGetRawEntry(Header h, int_32 tag, int_32 * type,
-		      void *p, int_32 *c);
+int headerGetRawEntry(Header h, rpmTag tag, rpmTagType* type,
+		      void *p, rpm_count_t* c);
 }
 #endif
 
@@ -334,7 +335,8 @@
 	    
 	    // the std tags
 	    for (i = 0; i < numTags; i++) {
-	       int type, count;
+	       rpmTagType type;
+               rpm_count_t count;
 	       void *data;
 	       int res;
 	       




More information about the fedora-extras-commits mailing list