RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Olivier Thauvin
Root: /v/rpm/cvs Email: nanardon@rpm5.org
Module: rpm Date: 27-Jul-2007 23:30:47
Branch: HEAD Handle: 2007072722304600
Modified files:
rpm/perl RPM.xs
Log:
- remove useless #ifdef RPM41, we will build the module against rpm
shipped with the tree
Summary:
Revision Changes Path
1.6 +1 -24 rpm/perl/RPM.xs
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/perl/RPM.xs
============================================================================
$ cvs diff -u -r1.5 -r1.6 RPM.xs
--- rpm/perl/RPM.xs 21 Jul 2007 15:44:22 -0000 1.5
+++ rpm/perl/RPM.xs 27 Jul 2007 21:30:46 -0000 1.6
@@ -5,10 +5,8 @@
#include "rpmlib.h"
#include "rpmcli.h"
-#ifdef RPM_RPM41
#include "rpmts.h"
#include "rpmte.h"
-#endif
#include "header.h"
#include "rpmdb.h"
@@ -18,10 +16,6 @@
#include "perl.h"
#include "XSUB.h"
-#if !defined(RPM_RPM41) && !defined(RPM_RPM40)
-#error Must define one of RPM_RPM41 or RPM_RPM40; perhaps Makefile.PL could not guess your RPM API version?
-#endif
-
/* Chip, this is somewhat stripped down from the default callback used by
the rpmcli. It has to be here to insure that we open the pkg again.
If we don't do this we get segfaults. I also, kept the updating of some
@@ -161,7 +155,6 @@
constants = perl_get_hv("RPM::constants", TRUE);
/* not the 'standard' way of doing perl constants, but a lot easier to maintain */
-#ifdef RPM_RPM41
REGISTER_CONSTANT(RPMVSF_DEFAULT);
REGISTER_CONSTANT(RPMVSF_NOHDRCHK);
REGISTER_CONSTANT(RPMVSF_NEEDPAYLOAD);
@@ -179,19 +172,13 @@
REGISTER_CONSTANT(_RPMVSF_NOPAYLOAD);
REGISTER_CONSTANT(TR_ADDED);
REGISTER_CONSTANT(TR_REMOVED);
-#endif
}
double
rpm_api_version(pkg)
char * pkg
CODE:
-#if defined(RPM_RPM41) && ! defined(RPM_RPM40)
- RETVAL = (double)4.1;
-#endif
-#if ! defined(RPM_RPM41) && defined(RPM_RPM40)
- RETVAL = (double)4.0;
-#endif
+ RETVAL = (double)5.0; /* TODO: kill this */
OUTPUT:
RETVAL
@@ -232,17 +219,13 @@
FILE *fp
int vsflags
PREINIT:
-#ifdef RPM_RPM41
rpmts ts;
-#endif
Header ret;
Header sigs;
rpmRC rc;
FD_t fd;
PPCODE:
-#ifdef RPM_RPM41
ts = rpmtsCreate();
-#endif
/* XXX Determine type of signature verification when reading
vsflags |= _RPMTS_VSF_NOLEGACY;
@@ -252,12 +235,8 @@
*/
fd = fdDup(fileno(fp));
-#ifdef RPM_RPM41
rpmtsSetVSFlags(ts, vsflags);
rc = rpmReadPackageFile(ts, fd, "filename or other identifier", &ret);
-#else
- rc = rpmReadPackageInfo(fd, NULL, &ret);
-#endif
Fclose(fd);
@@ -274,9 +253,7 @@
else {
croak("error reading package");
}
-#ifdef RPM_RPM41
ts = rpmtsFree(ts);
-#endif
void
_create_transaction(vsflags)
@@ .
Received on Fri Jul 27 23:30:47 2007