/[packages]/cauldron/perl-RPM4/current/SOURCES/RPM4-fix-build-with-rpm46.patch
ViewVC logotype

Contents of /cauldron/perl-RPM4/current/SOURCES/RPM4-fix-build-with-rpm46.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14433 - (show annotations) (download)
Thu Jan 13 15:24:36 2011 UTC (13 years, 2 months ago) by jquelin
File size: 21370 byte(s)
imported package perl-RPM4
1 The following packages require perl-RPM4:
2
3 (1) iurt
4 (2) perl-MDV-Repsys
5 (3) perl-Youri-Package-RPM-Builder
6 (4) perl-Youri-Package-RPM-Updater
7 (5) perl-Youri-Package
8 (6) mdv-youri-core
9
10 notes:
11 - (5) doesn't use proposes both Youri::Package::URPM and
12 Youri::Package::RPM4, and doesn't force usage of any.
13 - (6) is a fork of perl-Youri-Package, which uses Youri::Package::URPM
14 (and so perl-RPM4 is unused)
15
16 here is below the various functions/methods of perl-RPM4 used by the
17 packages above.
18
19 RPM4::add_macro (2)(3)(4)
20 RPM4::expand (2)(3)(4) [renamed expand_macro in rpm5]
21 RPM4::installsrpm (2)(4)
22 RPM4::rpmvercmp (4)
23 RPM4::setverbosity (2)(4)
24 RPM4::Sign->new
25 $sign->rpmssign [not available in rpm5]
26 RPM4::Transaction->new
27 $db->transadd (3) [renamed add_install in rpm5]
28 $db->transcheck (3) [renamed check in rpm5]
29 $db->transpbs (3) [renamed problems in rpm5]
30 $pbs->hasnext (3) [not available directly in rpm5]
31 $pbs->init (3) [not available directly in rpm5]
32 $pbs->problem (3) [not available directly in rpm5]
33 RPM4::Spec->new
34 $spec->binrpm (3)
35 $spec->sources (2)
36 $spec->sources_url (4)
37 $spec->srcheader (2)(3)(4)
38 $spec->srcrpm (3)
39 RPM4::Header->new
40 $header->compare
41 $header->dep [renamed dependencies in rpm5]
42 $deps->info [not available directly in rpm5]
43 $deps->init
44 $deps->next
45 $header->files
46 $files->filename
47 $files->init
48 $files->md5 [renamed digest in rpm5]
49 $files->mode
50 $files->next
51 $header->fullname [not available directly in rpm5]
52 $header->issrc [renamed is_source_package in rpm5]
53 $header->queryformat (1)(2) [renamed tagformat in rpm5]
54 $header->sourcerpmname [not available directly in rpm5]
55 $header->tag (4)
56 RPM4::Header::Dependencies->new [renamed RPM::Dependencies in rpm5]
57 $dep->overlap
58
59 nb:
60 - functions/methods above which are not used by (1), (2), (3), (4) are
61 used by either (5) or (6) (usually by both)
62 - i have annotated with [... in rpm5] the changes between perl-RPM4
63 and RPM perl module in rpm5 CVS
64 - except for ->rpmsign, the "not available in rpm5" have similar
65 functions in rpm5 RPM module
66
67
68 diff -p -up RPM4-0.23/src/Makefile.PL.rpm46 RPM4-0.23/src/Makefile.PL
69 --- RPM4-0.23/src/Makefile.PL.rpm46 2007-03-01 00:56:26.000000000 +0100
70 +++ RPM4-0.23/src/Makefile.PL 2009-01-19 13:23:30.000000000 +0100
71 @@ -33,17 +33,11 @@ foreach (qw(
72 4.2.0
73 4.4.1
74 4.4.2
75 - 4.4.3
76 - 4.4.4
77 - 4.4.5
78 - 4.4.6
79 - 4.4.7
80 - 4.4.8
81 )) {
82 $v = $_;
83 $v =~ s/\./_/g;
84 print $FH "#define RPM$v\n";
85 - $rpmv eq $_ and last;
86 + $rpmv =~ /^\Q$_/ and last;
87 }
88 print $FH "\n#endif\n";
89 close($FH);
90 @@ -89,7 +83,7 @@ WriteMakefile(
91 VERSION_FROM => '../lib/RPM4.pm',
92 OBJECT => "RPM4.o RPM4sign.o $obj",
93 INC => "-I$rpmheaderlocation",
94 - LIBS => "-lrpm -lrpmio -lrpmdb -lrpmbuild -lpopt -lz -lbz2 $ldd",
95 - 'CCFLAGS' => $fl,
96 + LIBS => "-lrpm -lrpmio -lrpmbuild -lpopt -lz -lbz2 $ldd",
97 + 'CCFLAGS' => "-Wall $fl",
98 depend => { "RPM4.xs" => join(" ", @rpmconstantfiles) },
99 );
100 diff -p -up RPM4-0.23/src/RPM4.h.rpm46 RPM4-0.23/src/RPM4.h
101 --- RPM4-0.23/src/RPM4.h.rpm46 2005-12-20 02:33:44.000000000 +0100
102 +++ RPM4-0.23/src/RPM4.h 2009-01-19 13:06:10.000000000 +0100
103 @@ -16,15 +16,6 @@ int rpmchecksig(rpmts ts, const char * f
104 * We Import its here
105 * This File should be the last included */
106
107 -/* From rpmlead.h */
108 -
109 -#ifndef _H_RPMLEAD
110 -
111 -rpmRC writeLead(FD_t fd, const struct rpmlead *lead);
112 -rpmRC readLead(FD_t fd, struct rpmlead *lead);
113 -
114 -#endif /* _H_RPMLEAD */
115 -
116 /* From signature.h */
117
118 #ifndef H_SIGNATURE
119 @@ -48,7 +39,7 @@ rpmRC rpmReadSignature(FD_t fd, Header *
120 int rpmWriteSignature(FD_t fd, Header h);
121
122 int rpmAddSignature(Header sig, const char * file,
123 - int_32 sigTag, const char * passPhrase);
124 + int32_t sigTag, const char * passPhrase);
125
126 #define RPMLOOKUPSIG_QUERY 0 /*!< Lookup type in effect */
127 #define RPMLOOKUPSIG_DISABLE 1 /*!< Disable (--sign was not given) */
128 @@ -71,10 +62,10 @@ const char * rpmDetectPGPVersion(pgpVers
129 */
130 typedef /*@abstract@*/ struct entryInfo_s * entryInfo;
131 struct entryInfo_s {
132 - int_32 tag; /*!< Tag identifier. */
133 - int_32 type; /*!< Tag data type. */
134 - int_32 offset; /*!< Offset into data segment (ondisk only). */
135 - int_32 count; /*!< Number of tag elements. */
136 + int32_t tag; /*!< Tag identifier. */
137 + int32_t type; /*!< Tag data type. */
138 + int32_t offset; /*!< Offset into data segment (ondisk only). */
139 + int32_t count; /*!< Number of tag elements. */
140 };
141
142 /** \ingroup header
143 diff -p -up RPM4-0.23/src/RPM4.xs.rpm46 RPM4-0.23/src/RPM4.xs
144 --- RPM4-0.23/src/RPM4.xs.rpm46 2007-07-22 02:23:52.000000000 +0200
145 +++ RPM4-0.23/src/RPM4.xs 2009-01-19 13:30:14.000000000 +0100
146 @@ -78,10 +78,14 @@
147 #include <rpm/rpmps.h>
148 #include <rpm/rpmfi.h>
149 #include <rpm/rpmpgp.h>
150 -#include <rpm/misc.h>
151 #include <rpm/rpmbuild.h>
152 +#include <rpm/rpmfileutil.h>
153 #include <rpm/rpmlib.h>
154 +#include <rpm/rpmlog.h>
155 #include <rpm/rpmpgp.h>
156 +#include <rpm/rpmtag.h>
157 +#define _RPM_4_4_COMPAT
158 +#include <rpm/rpmlegacy.h>
159
160 #ifdef HAVE_RPMCONSTANT
161 #include <rpmconstant/rpmconstant.h>
162 @@ -189,10 +193,10 @@ void *
163 #endif
164 transCallback(const void *h,
165 const rpmCallbackType what,
166 - const RPM_CALLBACK_AMOUNT_TYPE amount,
167 - const RPM_CALLBACK_AMOUNT_TYPE total,
168 - const void * pkgKey,
169 - void * data) {
170 + const rpm_loff_t amount,
171 + const rpm_loff_t total,
172 + fnpyKey pkgKey,
173 + rpmCallbackData data) {
174
175 /* The call back is used to open/close file, so we fix value, run the perl callback
176 * and let rpmShowProgress from rpm rpmlib doing its job.
177 @@ -292,7 +296,7 @@ void *
178 * is set for for the logging system.
179 * If the callback is set, rpm does not print any message,
180 * and let the callback to do it */
181 -void logcallback(void) {
182 +int logcallback(rpmlogRec rec, rpmlogCallbackData data) {
183 dSP;
184 if (log_callback_function) {
185 int logcode = rpmlogCode();
186 @@ -304,7 +308,7 @@ void logcallback(void) {
187 XPUSHs(sv_2mortal(newSVpv("logcode", 0)));
188 XPUSHs(sv_2mortal(newSViv(logcode)));
189 XPUSHs(sv_2mortal(newSVpv("msg", 0)));
190 - XPUSHs(sv_2mortal(newSVpv(rpmlogMessage(), 0)));
191 + XPUSHs(sv_2mortal(newSVpv((char *) rpmlogMessage(), 0)));
192 XPUSHs(sv_2mortal(newSVpv("priority", 0)));
193 XPUSHs(sv_2mortal(newSViv(RPMLOG_PRI(logcode))));
194 PUTBACK;
195 @@ -313,47 +317,6 @@ void logcallback(void) {
196 }
197 }
198
199 -/* This callback is run during transcheck */
200 -int transSolveCallback(rpmts ts, rpmds Dep, const void * data) {
201 - int rc = 0;
202 - int count;
203 - dSP;
204 -#ifdef HDLISTDEBUG
205 - PRINTF_CALL;
206 -#endif
207 - /* Should return -1 retry, 0 ignore, 1 not found */
208 - rc = rpmtsSolve(ts, Dep, data);
209 - /* PUSHMARK(SP); */
210 - if (ts) {
211 - XPUSHs(sv_2mortal(newSVpv("db", 0)));
212 - XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), bless_rpmts, rpmtsLink(ts, "RPM4 transSolveCallback()"))));
213 -#ifdef HDRPMMEM
214 - PRINTF_NEW(bless_rpmts, ts, ts->nrefs);
215 -#endif
216 -
217 - }
218 - if (Dep) {
219 - XPUSHs(sv_2mortal(newSVpv("dep", 0)));
220 - XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), bless_rpmds, rpmdsLink(Dep, "RPM4 transSolveCallback()"))));
221 -#ifdef HDRPMMEM
222 - PRINTF_NEW(bless_rpmds, Dep, Dep->nrefs);
223 -#endif
224 - }
225 - XPUSHs(sv_2mortal(newSVpv("rc", 0)));
226 - XPUSHs(sv_2mortal(newSViv(rc)));
227 - PUTBACK;
228 - count = call_sv((SV *) data, G_SCALAR);
229 - SPAGAIN;
230 - if (count) {
231 - rc = POPi;
232 - if (rc < -1 || rc > 1)
233 - croak("Uh Oh! Your perl callback should return 1 (retry), 0 (ignore) or 1 (not found) and not %d", rc);
234 - } else {
235 - rc = 1;
236 - }
237 - return rc;
238 -}
239 -
240 /**************************************************
241 * Real Function rpmts function with double call *
242 * Aka function(arg) or RPM4::Db->function(arg) *
243 @@ -416,7 +379,7 @@ void _newdep(SV * sv_deptag, char * name
244
245 /* Get a new specfile */
246 void _newspec(rpmts ts, char * filename, SV * svpassphrase, SV * svrootdir, SV * svcookies, SV * svanyarch, SV * svforce, SV * svverify) {
247 - Spec spec = NULL;
248 + rpmSpec spec = NULL;
249 char * passphrase = NULL;
250 char * rootdir = NULL;
251 char * cookies = NULL;
252 @@ -446,7 +409,15 @@ void _newspec(rpmts ts, char * filename,
253 verify = SvIV(svverify);
254
255 if (filename) {
256 - if (!parseSpec(ts, filename, rootdir, 0, passphrase, cookies, anyarch, force, verify))
257 + if (!parseSpec(ts, filename, rootdir
258 +#ifndef RPM4_4_8
259 + , NULL
260 +#endif
261 + ,0, passphrase, cookies, anyarch, force
262 +#ifdef RPM4_4_8
263 + , verify
264 +#endif
265 + ))
266 spec = rpmtsSetSpec(ts, NULL);
267 #ifdef HHACK
268 } else {
269 @@ -465,15 +436,15 @@ void _newspec(rpmts ts, char * filename,
270 }
271
272 /* Building a spec file */
273 -int _specbuild(rpmts ts, Spec spec, SV * sv_buildflags) {
274 +int _specbuild(rpmts ts, rpmSpec spec, SV * sv_buildflags) {
275 rpmBuildFlags buildflags = sv2rpmbuildflags(sv_buildflags);
276 if (buildflags == RPMBUILD_NONE) croak("No action given for build");
277 return buildSpec(ts, spec, buildflags, 0);
278 }
279
280 void _installsrpms(rpmts ts, char * filename) {
281 - const char * specfile = NULL;
282 - const char * cookies = NULL;
283 + char * specfile = NULL;
284 + char * cookies = NULL;
285 dSP;
286 I32 gimme = GIMME_V;
287 if (rpmInstallSource(
288 @@ -514,9 +485,9 @@ BOOT:
289 if (rpmReadConfigFiles(NULL, NULL) != 0)
290 croak("Can't read configuration");
291 #ifdef HDLISTDEBUG
292 -rpmSetVerbosity(RPMMESS_DEBUG);
293 +rpmSetVerbosity(RPMLOG_DEBUG);
294 #else
295 -rpmSetVerbosity(RPMMESS_NORMAL);
296 +rpmSetVerbosity(RPMLOG_NOTICE);
297 #endif
298 #ifdef HDRPMDEBUG
299 _rpmds_debug = -1;
300 @@ -572,10 +543,10 @@ setlogcallback(function)
301 SV * function
302 CODE:
303 if (function == NULL || !SvOK(function)) {
304 - rpmlogSetCallback(NULL);
305 + rpmlogSetCallback(NULL, NULL);
306 } else if (SvTYPE(SvRV(function)) == SVt_PVCV) {
307 log_callback_function = newSVsv(function);
308 - rpmlogSetCallback(logcallback);
309 + rpmlogSetCallback(logcallback, NULL);
310 } else
311 croak("First arg is not a code reference");
312
313 @@ -583,7 +554,7 @@ void
314 lastlogmsg()
315 PPCODE:
316 XPUSHs(sv_2mortal(newSViv(rpmlogCode())));
317 - XPUSHs(sv_2mortal(newSVpv(rpmlogMessage(), 0)));
318 + XPUSHs(sv_2mortal(newSVpv((char *) rpmlogMessage(), 0)));
319
320 int
321 setlogfile(filename)
322 @@ -609,7 +580,7 @@ readconfig(rcfile = NULL, target = NULL)
323 char * rcfile
324 char * target
325 CODE:
326 - RETVAL = rpmReadConfigFiles(rcfile, target);
327 + RETVAL = rpmReadConfigFiles(rcfile && rcfile[0] ? rcfile : NULL, target);
328 OUTPUT:
329 RETVAL
330
331 @@ -626,29 +597,7 @@ rpmlog(svcode, msg)
332 void
333 querytag()
334 PREINIT:
335 - int i = 0;
336 - const struct headerSprintfExtension_s * ext = rpmHeaderFormats;
337 - PPCODE:
338 - for (i = 0; i < rpmTagTableSize; i++) {
339 - XPUSHs(sv_2mortal(newSVpv(rpmTagTable[i].name + 7, 0)));
340 - XPUSHs(sv_2mortal(newSViv(rpmTagTable[i].val)));
341 - }
342 -
343 - while (ext->name != NULL) {
344 - if (ext->type == HEADER_EXT_MORE) {
345 - ext = ext->u.more;
346 - continue;
347 - }
348 - for (i = 0; i < rpmTagTableSize; i++) {
349 - if (!strcmp(rpmTagTable[i].name, ext->name))
350 - break;
351 - }
352 - if (i >= rpmTagTableSize && ext->type == HEADER_EXT_TAG) {
353 - XPUSHs(sv_2mortal(newSVpv(ext->name + 7, 0)));
354 - XPUSHs(sv_newmortal());
355 - }
356 - ext++;
357 - }
358 + CODE:
359
360 int
361 tagtypevalue(svtagtype)
362 @@ -672,7 +621,7 @@ tagName(tag)
363 PREINIT:
364 const char *r = NULL;
365 PPCODE:
366 - r = tagName(tag);
367 + r = rpmTagGetName(tag);
368 XPUSHs(sv_2mortal(newSVpv(r, 0)));
369
370 void
371 @@ -717,7 +666,7 @@ expand(name)
372 PPCODE:
373 const char * value = rpmExpand(name, NULL);
374 XPUSHs(sv_2mortal(newSVpv(value, 0)));
375 - free(value);
376 + free((char *) value);
377
378 void
379 expandnumeric(name)
380 @@ -1205,10 +1154,10 @@ Header_queryformat(h, query)
381 PREINIT:
382 char *s = NULL;
383 PPCODE:
384 - s = headerSprintf(h, query,
385 - rpmTagTable, rpmHeaderFormats, NULL);
386 + s = headerFormat(h, query,
387 + NULL);
388 XPUSHs(sv_2mortal(newSVpv(s, 0)));
389 - _free(s);
390 + free(s);
391
392 void
393 Header_fullname(h)
394 @@ -1254,7 +1203,7 @@ void
395 Header_nevr(header)
396 Header header
397 PPCODE:
398 - PUSHs(sv_2mortal(newSVpv(hGetNEVR(header, NULL), 0)));
399 + PUSHs(sv_2mortal(newSVpv(headerGetNEVR(header, NULL), 0)));
400
401 int
402 Header_issrc(h)
403 @@ -1686,7 +1635,7 @@ Ts_transadd(ts, header, key = NULL, upgr
404 /* if (! (headerGetEntry(eiu->h, RPMTAG_PREFIXES, &pft,
405 (void **) &paths, &c) && (c == 1))) { */
406 if (! headerIsEntry(header, RPMTAG_PREFIXES)) {
407 - rpmMessage(RPMMESS_ERROR,
408 + rpmMessage(RPMLOG_ERR,
409 _("package %s is not relocatable\n"), "");
410 XPUSHi((IV)1);
411 XSRETURN(1);
412 @@ -1828,22 +1777,10 @@ Ts_traverse_transaction(ts, callback, ty
413 RETVAL
414
415 int
416 -Ts_transcheck(ts, callback = NULL)
417 +Ts_transcheck(ts)
418 rpmts ts
419 - SV * callback
420 CODE:
421 - ts = rpmtsLink(ts, "RPM4 Db_transcheck()");
422 - if (callback != NULL && SvOK(callback) && SvTYPE(SvRV(callback)) == SVt_PVCV) { /* Be sure we have a code ref */
423 -#ifdef HDLISTDEBUG
424 - PRINTF_CALL;
425 -#endif
426 - rpmtsSetSolveCallback(ts, transSolveCallback, (void *) callback);
427 - }
428 -
429 RETVAL = rpmtsCheck(ts);
430 - /* Restoring default rpm setting */
431 - rpmtsSetSolveCallback(ts, rpmtsSolve, NULL);
432 - ts = rpmtsFree(ts);
433 OUTPUT:
434 RETVAL
435
436 @@ -1908,7 +1845,7 @@ Ts__transpbs(ts)
437 rpmps ps;
438 PPCODE:
439 ps = rpmtsProblems(ts);
440 - if (ps && ps->numProblems) /* if no problem, return undef */
441 + if (ps && rpmpsNumProblems(ps)) /* if no problem, return undef */
442 XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), bless_rpmps, ps)));
443
444 int
445 @@ -1916,22 +1853,22 @@ Ts_importpubkey(ts, filename)
446 rpmts ts
447 char * filename
448 PREINIT:
449 - const byte * pkt = NULL;
450 + uint8_t *pkt = NULL;
451 size_t pktlen = 0;
452 int rc;
453 CODE:
454 rpmtsClean(ts);
455
456 - if ((rc = pgpReadPkts(filename, &pkt, &pktlen)) <= 0) {
457 + if ((rc = pgpReadPkts(filename, (uint8_t ** ) &pkt, &pktlen)) <= 0) {
458 RETVAL = 1;
459 } else if (rc != PGPARMOR_PUBKEY) {
460 RETVAL = 1;
461 - } else if (rpmcliImportPubkey(ts, pkt, pktlen) != RPMRC_OK) {
462 + } else if (rpmtsImportPubkey(ts, pkt, pktlen) != RPMRC_OK) {
463 RETVAL = 1;
464 } else {
465 RETVAL = 0;
466 }
467 - pkt = _free(pkt);
468 + free(pkt);
469 OUTPUT:
470 RETVAL
471
472 @@ -1976,7 +1913,7 @@ Ts_rpm2header(ts, filename)
473 int
474 Ts_specbuild(ts, spec, sv_buildflags)
475 rpmts ts
476 - Spec spec
477 + rpmSpec spec
478 SV * sv_buildflags
479 CODE:
480 RETVAL = _specbuild(ts, spec, sv_buildflags);
481 @@ -2129,7 +2066,7 @@ rpmlibdep()
482 int i;
483 #endif
484 PPCODE:
485 -#ifndef RPM4_4_3
486 +#if 0
487 num = rpmGetRpmlibProvides(&provNames, &provFlags, &provVersions);
488 for (i = 0; i < num; i++) {
489 #ifdef HDLISTDEBUG
490 @@ -2616,20 +2553,13 @@ void
491 Files_md5(Files)
492 rpmfi Files
493 PREINIT:
494 - const byte * md5;
495 - char * fmd5 = malloc((char) 33);
496 + const char * md5;
497 PPCODE:
498 if ((md5 =
499 -#ifdef RPM4_4_6
500 - rpmfiDigest(Files, NULL, NULL)
501 -#else
502 - rpmfiMD5(Files)
503 -#endif
504 + rpmfiFDigestHex(Files, NULL)
505 ) != NULL && *md5 != 0 /* return undef if empty */) {
506 - (void) pgpHexCvt(fmd5, md5, 16);
507 - XPUSHs(sv_2mortal(newSVpv(fmd5, 0)));
508 + XPUSHs(sv_2mortal(newSVpv(md5, 0)));
509 }
510 - _free(fmd5);
511
512 void
513 Files_link(Files)
514 @@ -2772,7 +2702,7 @@ Spec_new(perlclass, specfile = NULL, ...
515
516 void
517 Spec_DESTROY(spec)
518 - Spec spec
519 + rpmSpec spec
520 CODE:
521 #ifdef HDRPMMEM
522 PRINTF_FREE(bless_spec, spec, -1);
523 @@ -2781,7 +2711,7 @@ Spec_DESTROY(spec)
524
525 void
526 Spec_srcheader(spec)
527 - Spec spec
528 + rpmSpec spec
529 PPCODE:
530 if ( ! spec->sourceHeader)
531 initSourceHeader(spec);
532 @@ -2789,7 +2719,7 @@ Spec_srcheader(spec)
533
534 void
535 Spec_binheader(spec)
536 - Spec spec
537 + rpmSpec spec
538 PREINIT:
539 Package pkg;
540 PPCODE:
541 @@ -2798,7 +2728,7 @@ Spec_binheader(spec)
542
543 void
544 Spec_srcrpm(spec)
545 - Spec spec
546 + rpmSpec spec
547 PREINIT:
548 const char *name, *version, *release;
549 PPCODE:
550 @@ -2814,10 +2744,10 @@ Spec_srcrpm(spec)
551
552 void
553 Spec_binrpm(spec)
554 - Spec spec
555 + rpmSpec spec
556 PREINIT:
557 Package pkg;
558 - const char * binFormat;
559 + char * binFormat;
560 char * binRpm;
561 char * path;
562 PPCODE:
563 @@ -2826,18 +2756,17 @@ Spec_binrpm(spec)
564 continue;
565 /* headerCopyTags(h, pkg->header, copyTags); */
566 binFormat = rpmGetPath("%{_rpmfilename}", NULL);
567 - binRpm = headerSprintf(pkg->header, binFormat, rpmTagTable,
568 - rpmHeaderFormats, NULL);
569 - _free(binFormat);
570 + binRpm = headerFormat(pkg->header, binFormat, NULL);
571 + free(binFormat);
572 path = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
573 XPUSHs(sv_2mortal(newSVpv(path, 0)));
574 - _free(path);
575 - _free(binRpm);
576 + free(path);
577 + free(binRpm);
578 }
579
580 void
581 Spec_check(spec, ts = NULL)
582 - Spec spec
583 + rpmSpec spec
584 PREINIT:
585 int rc;
586 rpmts ts = rpmtsCreate();
587 @@ -2863,7 +2792,7 @@ Spec_check(spec, ts = NULL)
588 croak("Can't check rpmts"); /* any better idea ? */
589
590 ps = rpmtsProblems(ts);
591 - if (ps && ps->numProblems) /* if no problem, return undef */
592 + if (ps && rpmpsNumProblems(ps)) /* if no problem, return undef */
593 XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), bless_rpmps, ps)));
594 ts = rpmtsFree(ts);
595 SPAGAIN;
596 @@ -2871,7 +2800,7 @@ Spec_check(spec, ts = NULL)
597
598 int
599 Spec_build(spec, sv_buildflags)
600 - Spec spec
601 + rpmSpec spec
602 SV * sv_buildflags
603 PREINIT:
604 rpmts ts = rpmtsCreate();
605 @@ -2883,7 +2812,7 @@ Spec_build(spec, sv_buildflags)
606
607 const char *
608 Spec_specfile(spec)
609 - Spec spec
610 + rpmSpec spec
611 CODE:
612 RETVAL = spec->specFile;
613 OUTPUT:
614 @@ -2891,7 +2820,7 @@ Spec_specfile(spec)
615
616 void
617 Spec_sources(spec, is = 0)
618 - Spec spec
619 + rpmSpec spec
620 int is
621 PREINIT:
622 struct Source *srcPtr;
623 @@ -2904,7 +2833,7 @@ Spec_sources(spec, is = 0)
624
625 void
626 Spec_sources_url(spec, is = 0)
627 - Spec spec
628 + rpmSpec spec
629 int is
630 PREINIT:
631 struct Source * srcPtr;
632 @@ -2917,7 +2846,7 @@ Spec_sources_url(spec, is = 0)
633
634 void
635 Spec_icon(spec)
636 - Spec spec
637 + rpmSpec spec
638 PREINIT:
639 Package pkg;
640 PPCODE:
641 @@ -2934,7 +2863,7 @@ Spec_icon(spec)
642
643 void
644 Spec_icon_url(spec)
645 - Spec spec
646 + rpmSpec spec
647 PREINIT:
648 Package pkg;
649 PPCODE:
650 @@ -2959,7 +2888,7 @@ ps_new(perlclass, ts)
651 rpmps ps;
652 PPCODE:
653 ps = rpmtsProblems(ts);
654 - if (ps && ps->numProblems) /* if no problem, return undef */
655 + if (ps && rpmpsNumProblems(ps)) /* if no problem, return undef */
656 XPUSHs(sv_2mortal(sv_setref_pv(newSVpv("", 0), bless_rpmps, ps)));
657
658 void
659 @@ -2989,13 +2918,9 @@ ps_isignore(ps, numpb)
660 int numpb
661 PREINIT:
662 rpmProblem p;
663 + int i;
664 CODE:
665 - if (ps->numProblems < numpb)
666 - RETVAL = 0; /* croak here ? */
667 - else {
668 - p = ps->probs + numpb;
669 - RETVAL = p->ignoreProblem;
670 - }
671 + RETVAL = 0; /* ignoreProblem is obsolete and always false */
672 OUTPUT:
673 RETVAL
674
675 @@ -3005,12 +2930,17 @@ ps_fmtpb(ps, numpb)
676 int numpb
677 PREINIT:
678 rpmProblem p;
679 + int i;
680 CODE:
681 - if (ps->numProblems < numpb)
682 - RETVAL = NULL;
683 - else {
684 - p = ps->probs + numpb;
685 + rpmpsi psi = rpmpsInitIterator(ps);
686 + for (i = 0; i <= numpb; i++)
687 + if (rpmpsNextIterator(psi) < 0) break;
688 +
689 + p = rpmpsGetProblem(psi);
690 + if (p)
691 RETVAL = rpmProblemString(p);
692 + else {
693 + RETVAL = NULL;
694 }
695 OUTPUT:
696 RETVAL
697 diff -p -up RPM4-0.23/src/typemap.rpm46 RPM4-0.23/src/typemap
698 --- RPM4-0.23/src/typemap.rpm46 2005-12-20 02:33:44.000000000 +0100
699 +++ RPM4-0.23/src/typemap 2009-01-19 13:06:10.000000000 +0100
700 @@ -1,6 +1,6 @@
701 TYPEMAP
702 Header O_OBJECT
703 -Spec O_OBJECT
704 +rpmSpec O_OBJECT
705 rpmts O_OBJECT
706 rpmds O_OBJECT
707 rpmfi O_OBJECT
708 diff -p -up RPM4-0.23/src/RPM4sign.c.pix RPM4-0.23/src/RPM4sign.c
709 --- RPM4-0.23/src/RPM4sign.c.pix 2005-12-20 02:33:44.000000000 +0100
710 +++ RPM4-0.23/src/RPM4sign.c 2009-01-20 13:07:34.000000000 +0100
711 @@ -15,10 +15,9 @@
712 /* Hight level function */
713 int rpmsign(char *passphrase, const char *rpm) {
714 QVA_t qva = &rpmQVKArgs;
715 - const char * file[2];
716 + ARGV_t file = NULL;
717
718 - file[0] = rpm;
719 - file[1] = NULL;
720 + argvAdd(&file, rpm);
721
722 qva->qva_mode = RPMSIGN_ADD_SIGNATURE;
723 qva->passPhrase = passphrase;
724 diff -p -up RPM4-0.23/t/07dep.t.pix RPM4-0.23/t/07dep.t
725 --- RPM4-0.23/t/07dep.t.pix 2007-03-07 22:26:16.000000000 +0100
726 +++ RPM4-0.23/t/07dep.t 2009-01-20 13:02:13.000000000 +0100
727 @@ -15,7 +15,7 @@ isa_ok(
728 );
729
730 SKIP: {
731 - if ($minfo{RPMVERSION} lt '4.4.3') {
732 + if (1 || $minfo{RPMVERSION} lt '4.4.3') {
733 skip(
734 "These function are supported only for rpm 4.4.3 or highter",
735 4

  ViewVC Help
Powered by ViewVC 1.1.30