[Apt-Rpm] rpm 4.4.9 woes for apt-rpm

Ralf Corsepius rc040203 at freenet.de
Mon Aug 27 22:34:49 PDT 2007


On Tue, 2007-08-28 at 12:33 +1200, Tobias Gerschner wrote:
> Hi,
> 
> Thanks for the patch, attached are 2 further patches to get apt-get
> compiled with rpm 4.4.9 .  Testing of apt-get yet to be done.
> 
> Thx goes to Armin Kazmi ( apriori ) to helping me with his superior
> C++ knowledge , so apt-0.5.15lorg3.92-cleanup.diff is his work.
> 
> The other patch is a quick hack removing a definition I could not find
> at all in the headers of rpm 4.4.9.
>
> If anyone finds issues with these please let us know.

Your patch isn't correct, you are duplicating destructors, e.g. this:

diff -Nur apt-0.5.15lorg3.92/apt-pkg/contrib/progress.cc apt-0.5.15lorg3.92.patched/apt-pkg/contrib/progress.cc
--- apt-0.5.15lorg3.92/apt-pkg/contrib/progress.cc      2007-04-27 19:47:53.000000000 +1200
+++ apt-0.5.15lorg3.92.patched/apt-pkg/contrib/progress.cc      2007-08-28 08:13:31.236306238 +1200
@@ -33,11 +33,18 @@
    memset(&LastTime,0,sizeof(LastTime));
 }
                                                                        /*}}}*/
+//moved implementation                                                                 
+OpProgress::~OpProgress()
+{
+
+}
...

diff -Nur apt-0.5.15lorg3.92/apt-pkg/contrib/progress.h
apt-0.5.15lorg3.92.patched/apt-pkg/contrib/progress.h
--- apt-0.5.15lorg3.92/apt-pkg/contrib/progress.h       2007-03-19
07:09:42.000000000 +1200
+++
apt-0.5.15lorg3.92.patched/apt-pkg/contrib/progress.h       2007-08-28
08:13:31.261302424 +1200
@@ -68,7 +68,7 @@
    virtual void Done() {};
    
    OpProgress();
-   virtual ~OpProgress() {};
+   virtual ~OpProgress();
 };


---

Here you are breaking backward compatibility:

+// min/max operates have been declared deprecated and are no longer
functional
+// in g++ 4.2.1
+//#if defined(__GNUG__)
+//#define MIN(A,B) ((A) <? (B))
+//#define MAX(A,B) ((A) >? (B))
+//#endif
 
---
diff -Nur apt-0.5.15lorg3.92/apt-pkg/rpm/rpmrecords.h apt-0.5.15lorg3.92.patched/apt-pkg/rpm/rpmrecords.h
--- apt-0.5.15lorg3.92/apt-pkg/rpm/rpmrecords.h 2007-03-19 07:09:42.000000000 +1200
+++ apt-0.5.15lorg3.92.patched/apt-pkg/rpm/rpmrecords.h 2007-08-28 08:28:39.662720092 +1200
@@ -22,6 +22,8 @@
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/rpmhandler.h>
+//needed for RPMSENSE_* declarations
+#include <rpm/rpmevr.h>

rpmevr.h doesn't exist in upstream rpm. Apparently the fork of rpm you
are using has broken the API incompatibly.


Ralf





More information about the Apt-Rpm mailing list