[Apt-Rpm] Compilation issues with 0.5.15lorg3.94a (rpmpm.cc)

Vincent Danen vdanen at annvix.org
Thu Mar 6 15:30:27 PST 2008


* [2008-03-06 20:49:44 +0100] Per ?yvind Karlsen wrote:

>> >Wild guess without knowing what rpm version you have or how code for apt
>> >0.5.15lorg3.94a(neat versioning!) looks like, but I would think that
>> > you'll find something like 'typedef unsigned long rpmCallbackSize_t' in
>> >aptcallback.h or wherever it might reside, make it 'typedef unsigned long
>> >long rpmCallbackSize_t'.
>>
>> Ok, I see it in apt-pkg/rpm/aptcallback.h:
>>
>> #if HAVE_RPM_RPMCB_H
>> typedef unsigned long long rpmCallbackSize_t;
>> #else
>> typedef unsigned long rpmCallbackSize_t;
>> #endif
>>
>> and in include/config.h:
>>
>> /* Define to 1 if you have the <rpm/rpmcb.h> header file. */
>> /* #undef HAVE_RPM_RPMCB_H */
>>
>> Just looked, and I don't have rpm/rpmcb.h (using rpm 4.4.5).
>>
>> The following patch fixes the compilation for me, but not sure if this
>> would be the correct way to do it:
>>
>> --- apt-pkg/rpm/aptcallback.h~  2008-03-06 11:51:09.113968991 -0700
>> +++ apt-pkg/rpm/aptcallback.h   2008-03-06 11:51:09.113968991 -0700
>> @@ -4,11 +4,7 @@
>>   #include <apt-pkg/progress.h>
>>   #include <rpm/rpmcli.h>
>>
>> -#if HAVE_RPM_RPMCB_H
>>   typedef unsigned long long rpmCallbackSize_t;
>> -#else
>> -typedef unsigned long rpmCallbackSize_t;
>> -#endif
>>
>>   #if RPM_VERSION < 0x040000
>>   void * rpmCallback(const Header h,
>>
>> Thanks for the hints, Per!  =)
>
>I guess there's been some (obviously?) false assumption on that rpmcb.h showed 
>up at the same time of the change to 'unsigned long long' which AFAIK took 
>place in rpm 4.4.5. So the more correct patch would probably be the following 
>(with my rpm 5.0 adaption as well):
>
>--- a/apt-pkg/rpm/aptcallback.h
>+++ b/apt-pkg/rpm/aptcallback.h
>@@ -4,7 +4,9 @@
> #include <apt-pkg/progress.h>
> #include <rpm/rpmcli.h>
>
>-#if HAVE_RPM_RPMCB_H
>+#if RPM_VERSION >= 0x050000
>+typedef uint64_t rpmCallbackSize_t;
>+#elif RPM_VERSION >= 0x040405
> typedef unsigned long long rpmCallbackSize_t;
> #else
> typedef unsigned long rpmCallbackSize_t;

Just rebuilt with this patch and it works.  Thanks.

-- 
Vincent Danen @ http://linsec.ca/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.laiskiainen.org/pipermail/apt-rpm-laiskiainen.org/attachments/20080306/1f46283a/attachment-0003.pgp>


More information about the Apt-Rpm mailing list