diff options
-rwxr-xr-x | Makefile.PL | 2 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | URPM.xs | 44 |
3 files changed, 2 insertions, 45 deletions
diff --git a/Makefile.PL b/Makefile.PL index fc330e9..5d505e7 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -27,7 +27,7 @@ $version =~ s/(-.*)|(\.DEVEL)//; chomp $version; $version =~ s/(RPM version )|(rpm \(RPM\) )//; my $hversion = hexversion($version); -$hversion ge hexversion("4.8") or die "Unable to build URPM with too old (or undetected) rpm version $version\n"; +$hversion ge hexversion("4.9") or die "Unable to build URPM with too old (or undetected) rpm version $version\n"; # to generate the ChangeLog depending on the checkout layout my $commonusername = "../common/"; @@ -1,3 +1,4 @@ +- drop support for rpm-4.8.x - kill functions unimplemented for years Version 3.40 - 16 March 2012 @@ -1334,20 +1334,12 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h, i = POPi; fd = fdDup(i); if (fd) { -#ifdef RPM490 fd = fdLink(fd); -#else - fd = fdLink(fd, "persist perl-URPM"); -#endif Fcntl(fd, F_SETFD, (void *)1); /* necessary to avoid forked/execed process to lock removable */ } PUTBACK; } else if (callback == td->callback_close) { -#ifdef RPM490 fd = fdFree(fd); -#else - fd = fdFree(fd, "persist perl-URPM"); -#endif if (fd) { Fclose(fd); fd = NULL; @@ -2732,11 +2724,7 @@ Db_traverse(db,callback) rpmdbMatchIterator mi; int count = 0; CODE: -#ifdef RPM490 db->ts = rpmtsLink(db->ts); -#else - db->ts = rpmtsLink(db->ts, "URPM::DB::traverse"); -#endif ts_nosignature(db->ts); mi = rpmtsInitIterator(db->ts, RPMDBI_PACKAGES, NULL, 0); while ((header = rpmdbNextIterator(mi))) { @@ -2786,11 +2774,7 @@ Db_traverse_tag(db,tag,names,callback) STRLEN str_len; SV **isv = av_fetch(names_av, i, 0); char *name = SvPV(*isv, str_len); -#ifdef RPM490 db->ts = rpmtsLink(db->ts); -#else - db->ts = rpmtsLink(db->ts, "URPM::DB::traverse_tag"); -#endif ts_nosignature(db->ts); mi = rpmtsInitIterator(db->ts, rpmtag, name, str_len); while ((header = rpmdbNextIterator(mi))) { @@ -2832,11 +2816,7 @@ Db_traverse_tag_find(db,tag,name,callback) CODE: int rpmtag = rpmtag_from_string(tag); int found = 0; -#ifdef RPM490 db->ts = rpmtsLink(db->ts); -#else - db->ts = rpmtsLink(db->ts, "URPM::DB::traverse_tag"); -#endif ts_nosignature(db->ts); mi = rpmtsInitIterator(db->ts, rpmtag, name, 0); while ((header = rpmdbNextIterator(mi))) { @@ -2873,11 +2853,7 @@ Db_create_transaction(db, prefix="/") CODE: /* this is *REALLY* dangerous to create a new transaction while another is open, so use the db transaction instead. */ -#ifdef RPM490 db->ts = rpmtsLink(db->ts); -#else - db->ts = rpmtsLink(db->ts, "URPM::DB::create_transaction"); -#endif ++db->count; RETVAL = db; OUTPUT: @@ -3176,11 +3152,7 @@ Trans_run(trans, data, ...) if (repa) free(repa); } rpmtsSetFlags(trans->ts, transFlags); -#ifdef RPM490 trans->ts = rpmtsLink(trans->ts); -#else - trans->ts = rpmtsLink(trans->ts, "URPM::Transaction::run"); -#endif rpmtsSetNotifyCallback(trans->ts, rpmRunTransactions_callback, &td); if (rpmtsRun(trans->ts, NULL, probFilter) > 0) { rpmps ps = rpmtsProblems(trans->ts); @@ -3635,11 +3607,7 @@ Urpm_import_pubkey_file(db, filename) size_t pktlen = 0; int rc; CODE: -#ifdef RPM490 rpmts ts = rpmtsLink(db->ts); -#else - rpmts ts = rpmtsLink(db->ts, "URPM::import_pubkey_file"); -#endif rpmtsClean(ts); if ((rc = pgpReadPkts(filename, (uint8_t ** ) &pkt, &pktlen)) <= 0) @@ -3719,13 +3687,9 @@ Urpm_spec2srcheader(specfile) #define SPEC_ANYARCH 1 /* Do not verify whether sources exist */ #define SPEC_FORCE 1 -#ifdef RPM490 spec = rpmSpecParse(specfile, RPMSPEC_ANYARCH|RPMSPEC_FORCE, NULL); if (spec) { header = rpmSpecSourceHeader(spec); -#else - if (!parseSpec(ts, specfile, "/", NULL, 0, NULL, NULL, SPEC_ANYARCH, SPEC_FORCE)) { -#endif SV *sv_pkg; #ifndef RPM490 // FIXME: has disappeared in rpm-4.9.0rpmSpecParse @@ -3748,19 +3712,11 @@ Urpm_spec2srcheader(specfile) /* parseSpec() sets RPMTAG_ARCH to %{_target_cpu} whereas we really a header similar to .src.rpm header */ headerMod(header, &td); } -#ifdef RPM490 pkg->h = headerLink(header); -#else - pkg->h = headerLink(spec->sourceHeader); -#endif sv_pkg = sv_newmortal(); sv_setref_pv(sv_pkg, "URPM::Package", (void*)pkg); XPUSHs(sv_pkg); -#ifdef RPM490 spec = rpmSpecFree(spec); -#else - spec = freeSpec(spec); -#endif } else { XPUSHs(&PL_sv_undef); /* apparently rpmlib sets errno this when given a bad spec. */ |