[devel] Re: RPM::Database
Dmitry V. Levin
=?iso-8859-1?q?ldv_=CE=C1_altlinux=2Eorg?=
Ср Окт 19 21:17:25 MSD 2005
On Wed, Oct 19, 2005 at 07:50:32PM +0400, Alexey Tourbin wrote:
> On Wed, Oct 19, 2005 at 06:18:10PM +0400, Alexey Tourbin wrote:
> > On Wed, Oct 19, 2005 at 05:56:35PM +0400, Alexey Tourbin wrote:
> > > > После пересборки perl-RPM работает.
> > > Сломался rpmTagTable.
> > $ cat test.c
>
> Ну?
Странно всё это:
$ cvs diff -u -r rpm-4_0_4-alt51 lib/rpmlib.h
[...]
--- lib/rpmlib.h 29 Feb 2004 14:14:02 -0000 1.6
+++ lib/rpmlib.h 17 Oct 2005 11:49:21 -0000
[...]
@@ -178,7 +196,7 @@
*/
/*@-redecl@*/
/*@observer@*/ /*@unchecked@*/
-extern const struct headerTagTableEntry_s rpmTagTable[];
+extern const struct headerTagTableEntry_s * rpmTagTable;
/*@=redecl@*/
/**
$ cat rttest.c
#include <stdio.h>
#include <rpmlib.h>
int main()
{
printf("rpmTagTableSize = %i\nrpmTagTable = %p\nrpmTagTable[0].name = %s (%p)\n",
rpmTagTableSize, rpmTagTable,
rpmTagTable[0].name, rpmTagTable[0].name);
return 0;
}
alt51$ gcc -Wall -Werror -I/usr/include/rpm rttest.c -lrpm -orttest-alt51
alt51$ ./rttest-alt51
rpmTagTableSize = 125
rpmTagTable = 0x8049740
rpmTagTable[0].name = RPMTAG_HEADERIMAGE (0x16b8e4)
alt52$ gcc -Wall -Werror -I/usr/include/rpm rttest.c -lrpm -orttest-alt52
alt52$ ./rttest-alt52
rpmTagTableSize = 125
rpmTagTable = 0x2b00a0
rpmTagTable[0].name = RPMTAG_HEADERIMAGE (0x2ae760)
alt51$ ./rttest-alt52
./rttest-alt52: Symbol `rpmTagTable' has different size in shared object, consider re-linking
rpmTagTableSize = 125
rpmTagTable = 0x16b8e4
Segmentation fault
alt52$ ./rttest-alt51
rpmTagTableSize = 125
rpmTagTable = 0x8049740
rpmTagTable[0].name = `Г* (0x2b00a0)
Тут он прав, полное Г*.
Ну что, придётся откатить этот backport?
--
ldv
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип : application/pgp-signature
Размер : 189 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url : <http://lists.altlinux.org/pipermail/devel/attachments/20051019/7390bdd4/attachment-0001.bin>
Подробная информация о списке рассылки Devel