diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-26 13:17:07 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-26 13:17:07 +0300 |
commit | 059de6fa03f8c2113ce60d6857a5bf0746c43e0c (patch) | |
tree | 5babf5dab8db29505008712dec6a7de9c9eb2b97 /lib/rpminstall.c | |
parent | 3a32216d0299c6aa771ae849749c3f590db82a0d (diff) | |
download | librpm-tizen-059de6fa03f8c2113ce60d6857a5bf0746c43e0c.tar.gz librpm-tizen-059de6fa03f8c2113ce60d6857a5bf0746c43e0c.tar.bz2 librpm-tizen-059de6fa03f8c2113ce60d6857a5bf0746c43e0c.zip |
Convert rpmInstall() to new headerGet()
Diffstat (limited to 'lib/rpminstall.c')
-rw-r--r-- | lib/rpminstall.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 2b24a1d12..141cf9d45 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -398,15 +398,12 @@ restart: } if (eiu->relocations) { - const char ** paths; - rpmTagType pft; - rpm_count_t c; - - if (headerGetEntry(eiu->h, RPMTAG_PREFIXES, &pft, - (rpm_data_t *) &paths, &c) && (c == 1)) - { - eiu->relocations->oldPath = xstrdup(paths[0]); - paths = headerFreeData(paths, pft); + struct rpmtd_s prefixes; + + headerGet(eiu->h, RPMTAG_PREFIXES, &prefixes, HEADERGET_DEFAULT); + if (rpmtdCount(&prefixes) == 1) { + eiu->relocations->oldPath = xstrdup(rpmtdGetString(&prefixes)); + rpmtdFreeData(&prefixes); } else { const char * name; xx = headerNVR(eiu->h, &name, NULL, NULL); |