summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2016-03-30 23:21:19 +0300
committerPatrick Williams <patrick@stwcx.xyz>2016-03-30 23:21:19 +0300
commitb4a027550acf2c1051c34f997b8e7e845017af4b (patch)
tree9e38d3c17b42cb1e6765620a87e908973a93c821 /yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
parent2fe86d90044af218ced8f42fdded6b136f1046d2 (diff)
parentf1e5d6968976c2341c6d554bfcc8895f1b33c26b (diff)
downloadopenbmc-b4a027550acf2c1051c34f997b8e7e845017af4b.tar.xz
Merge commit 'f1e5d6968976c2341c6d554bfcc8895f1b33c26b' from yocto-2.0.1
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c')
-rw-r--r--yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
index 7f4caf988..c0b4d567f 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
@@ -42,7 +42,7 @@ FILE *outf;
int getPackageStr(rpmts ts, const char *NVRA, rpmTag tag, char **value)
{
int rc = -1;
- rpmmi mi = rpmtsInitIterator(ts, RPMTAG_NVRA, NVRA, 0);
+ rpmmi mi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_NVRA, NVRA, 0);
Header h;
if ((h = rpmmiNext(mi)) != NULL) {
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
@@ -225,7 +225,7 @@ int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int ignor
int lookupProvider(rpmts ts, const char *req, char **provider)
{
int rc = 0;
- rpmmi provmi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, req, 0);
+ rpmmi provmi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_PROVIDENAME, req, 0);
if(provmi) {
Header h;
if ((h = rpmmiNext(provmi)) != NULL) {
@@ -266,7 +266,7 @@ int printDepList(rpmts *ts, int tscount)
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
int nkeys = argvCount(keys);
for(i=0; i<nkeys; i++) {
- rpmmi mi = rpmtsInitIterator(ts[0], RPMTAG_NVRA, keys[i], 0);
+ rpmmi mi = rpmmiInit(db, RPMTAG_NVRA, keys[i], 0);
Header h;
if ((h = rpmmiNext(mi)) != NULL) {
/* Get name of package */
@@ -280,6 +280,8 @@ int printDepList(rpmts *ts, int tscount)
printf("DEBUG: %s requires null\n", name);
}
rc = 0;
+ free(name);
+ (void)rpmmiFree(mi);
continue;
}
ARGV_t reqs = (ARGV_t)he->p.ptr;
@@ -412,7 +414,7 @@ int main(int argc, char **argv)
}
for(i=0; i<tscount; i++)
- (void) rpmtsCloseDB(ts[i]);
+ (void)rpmtsFree(ts[i]);
free(ts);
if( outfile ) {