From af7db96b448d2877f341289deba16d14723eca61 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 9 Nov 2011 13:02:33 +0000 Subject: drop support for rpm-4.4.x rationale: - too much ifdef/else/endif spaghetti - and already broken since rpm-4.6 & rpm-4.8 support patches git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@148 971eb68f-4bfb-0310-8326-d2484c010a4c --- RPM4/NEWS | 1 + RPM4/src/RPM4.xs | 35 ----------------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/RPM4/NEWS b/RPM4/NEWS index 561d0dc..513b566 100644 --- a/RPM4/NEWS +++ b/RPM4/NEWS @@ -1,2 +1,3 @@ - add rpm-4.6 support (pixel, 2009-01-20) - add rpm-4.8 support (Dexter Morgan, 2011-02) +- drop support for rpm-4.4.x (spaghetti...) diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index 8b769b8..a76161b 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -65,9 +65,6 @@ #endif #include "rpmversion.h" -#ifdef RPM4_4_6 - #define _RPMPS_INTERNAL -#endif #include #include @@ -410,13 +407,8 @@ void _newspec(rpmts ts, char * filename, SV * svpassphrase, SV * svrootdir, SV * if (filename) { if (!parseSpec(ts, filename, rootdir -#ifndef RPM4_4_8 , NULL -#endif ,0, passphrase, cookies, anyarch, force -#ifdef RPM4_4_8 - , verify -#endif )) spec = rpmtsSetSpec(ts, NULL); #ifdef HHACK @@ -748,12 +740,8 @@ platformscore(platform) const char * platform PREINIT: CODE: -#ifdef RPM4_4_8 - RETVAL=rpmPlatformScore(platform, NULL, 0); -#else RETVAL=0; croak("platformscore exists only from rpm 4.4.8"); -#endif OUTPUT: RETVAL @@ -1617,9 +1605,6 @@ Ts_transadd(ts, header, key = NULL, upgrade = 1, sv_relocation = NULL, force = 0 int force PREINIT: rpmRelocation * relocations = NULL; -#ifdef RPM4_4_6 - rpmRelocation relptr = NULL; -#endif HV * hv_relocation; HE * he_relocation; int i = 0; @@ -1643,42 +1628,22 @@ Ts_transadd(ts, header, key = NULL, upgrade = 1, sv_relocation = NULL, force = 0 if (SvTYPE(sv_relocation) == SVt_PV) { /* String value, assume a prefix */ relocations = malloc(2 * sizeof(*relocations)); -#ifdef RPM4_4_6 - relptr = relocations[0]; - relptr->newPath = SvPV_nolen(sv_relocation); - relptr = relocations[1]; - relptr->oldPath = relptr->newPath = NULL; -#else relocations[0].oldPath = NULL; relocations[0].newPath = SvPV_nolen(sv_relocation); relocations[1].oldPath = relocations[1].newPath = NULL; -#endif } else if (SvTYPE(SvRV(sv_relocation)) == SVt_PVHV) { hv_relocation = (HV*)SvRV(sv_relocation); hv_iterinit(hv_relocation); while ((he_relocation = hv_iternext(hv_relocation)) != NULL) { relocations = realloc(relocations, sizeof(*relocations) * (++i)); -#ifdef RPM4_4_6 - relptr = relocations[i-1]; - relptr->oldPath = NULL; - relptr->newPath = NULL; - relptr->oldPath = hv_iterkey(he_relocation, &len); - relptr->newPath = SvPV_nolen(hv_iterval(hv_relocation, he_relocation)); -#else relocations[i-1].oldPath = NULL; relocations[i-1].newPath = NULL; relocations[i-1].oldPath = hv_iterkey(he_relocation, &len); relocations[i-1].newPath = SvPV_nolen(hv_iterval(hv_relocation, he_relocation)); -#endif } /* latest relocation is identify by NULL setting */ relocations = realloc(relocations, sizeof(*relocations) * (++i)); -#ifdef RPM4_4_6 - relptr = relocations[i-1]; - relptr->oldPath = relptr->newPath = NULL; -#else relocations[i-1].oldPath = relocations[i-1].newPath = NULL; -#endif } else { croak("latest argument is set but is not an array ref or a string"); } -- cgit v1.2.1