From 7f8485a61cc7863d0047f0828f66a0579aa2b768 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 12 Jun 2008 17:37:33 +0300 Subject: [PATCH] Convert a few hge()'s in relocation code to new headerGet() & friends --- lib/rpmfi.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/lib/rpmfi.c b/lib/rpmfi.c index 43fbf95..0589d46 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -1038,24 +1038,22 @@ dColors[j] |= fColors[i]; /* Save original filenames in header and replace (relocated) filenames. */ if (nrelocated) { - rpm_count_t c; - void * d; - rpmTagType t; - - d = NULL; - xx = hge(h, RPMTAG_BASENAMES, &t, &d, &c); - xx = hae(h, RPMTAG_ORIGBASENAMES, t, d, c); - d = hfd(d, t); - - d = NULL; - xx = hge(h, RPMTAG_DIRNAMES, &t, &d, &c); - xx = hae(h, RPMTAG_ORIGDIRNAMES, t, d, c); - d = hfd(d, t); - - d = NULL; - xx = hge(h, RPMTAG_DIRINDEXES, &t, &d, &c); - xx = hae(h, RPMTAG_ORIGDIRINDEXES, t, d, c); - d = hfd(d, t); + struct rpmtd_s td; + + headerGet(h, RPMTAG_BASENAMES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGBASENAMES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerGet(h, RPMTAG_DIRNAMES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGDIRNAMES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerGet(h, RPMTAG_DIRINDEXES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGDIRINDEXES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); xx = hme(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE, baseNames, fileCount); -- 2.7.4