summaryrefslogtreecommitdiff
path: root/build/files.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-05-26 15:16:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-05-26 15:16:39 +0300
commit1315d9f498a38916a128ef95d3bbd7557fc1ebc3 (patch)
tree3fea7a0520026cd9e45be3d3b2e0a02d6ef93fdf /build/files.c
parent0537efeb77531d2db84deee1c0c872617f00caab (diff)
downloadlibrpm-tizen-1315d9f498a38916a128ef95d3bbd7557fc1ebc3.tar.gz
librpm-tizen-1315d9f498a38916a128ef95d3bbd7557fc1ebc3.tar.bz2
librpm-tizen-1315d9f498a38916a128ef95d3bbd7557fc1ebc3.zip
Convert processPackageFiles() to new headerGet() interface
Diffstat (limited to 'build/files.c')
-rw-r--r--build/files.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/build/files.c b/build/files.c
index 3c997eebc..47ad2893a 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1676,7 +1676,6 @@ exit:
static rpmRC processPackageFiles(rpmSpec spec, Package pkg,
int installSpecialDoc, int test)
{
- HGE_t hge = (HGE_t)headerGetEntryMinMemory;
struct FileList_s fl;
char *s, **fp;
ARGV_t files = NULL;
@@ -1728,10 +1727,12 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg,
/* XXX spec->buildRoot == NULL, then xstrdup("") is returned */
fl.buildRoot = rpmGenPath(spec->rootDir, spec->buildRoot, NULL);
- if (hge(pkg->header, RPMTAG_DEFAULTPREFIX, NULL, (rpm_data_t *)&fl.prefix, NULL))
- fl.prefix = xstrdup(fl.prefix);
- else
- fl.prefix = NULL;
+ { struct rpmtd_s td;
+ const char *prefix;
+ headerGet(pkg->header, RPMTAG_DEFAULTPREFIX, &td, HEADERGET_MINMEM);
+ prefix = rpmtdGetString(&td);
+ fl.prefix = prefix ? xstrdup(prefix) : NULL;
+ }
fl.fileCount = 0;
fl.totalFileSize = 0;