summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-12-07 13:52:30 +0100
committerMichael Schroeder <mls@suse.de>2012-12-07 13:52:30 +0100
commitcc687652223bb653898b501bade728e1884b74f9 (patch)
tree27feea9fe7cd6a46f0afdb24fb84e885a7f3bc46
parent47e0794d2d6bc11e5c891e42411506ee9162eaa5 (diff)
downloadlibsolv-cc687652223bb653898b501bade728e1884b74f9.tar.gz
libsolv-cc687652223bb653898b501bade728e1884b74f9.tar.bz2
libsolv-cc687652223bb653898b501bade728e1884b74f9.zip
print bad package name when detecting dependency array mismatches
-rw-r--r--ext/repo_rpmdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index 4889ded..c7b8a15 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -467,7 +467,9 @@ makedeps(Pool *pool, Repo *repo, RpmHead *rpmhead, int tagn, int tagv, int tagf,
}
if (nc != vc || nc != fc)
{
- fprintf(stderr, "bad dependency entries\n");
+ char *pkgname = rpm_query(rpmhead, 0);
+ fprintf(stderr, "bad dependency entries for %s: %d %d %d\n", pkgname ? pkgname : "<NULL>", nc, vc, fc);
+ solv_free(pkgname);
return 0;
}
@@ -2269,12 +2271,10 @@ rpm_query(void *rpmhandle, Id what)
if (!arch)
arch = "noarch";
evr = headtoevr(rpmhead);
- if (!evr)
- break;
- l = strlen(name) + 1 + strlen(evr) + 1 + strlen(arch) + 1;
+ l = strlen(name) + 1 + strlen(evr ? evr : "") + 1 + strlen(arch) + 1;
r = solv_malloc(l);
- sprintf(r, "%s-%s.%s", name, evr, arch);
- free(evr);
+ sprintf(r, "%s-%s.%s", name, evr ? evr : "", arch);
+ solv_free(evr);
break;
case SOLVABLE_NAME:
name = headstring(rpmhead, TAG_NAME);