From: Michael Schroeder Date: Fri, 7 Nov 2008 11:36:41 +0000 (+0000) Subject: - got rid of some fprintfs... X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cf63e693cfca14d0aa7d5accced2f640cc63c65;p=thirdparty%2Flibsolv.git - got rid of some fprintfs... --- diff --git a/tools/repo_patchxml.c b/tools/repo_patchxml.c index b7bc7805..f7fdb0ef 100644 --- a/tools/repo_patchxml.c +++ b/tools/repo_patchxml.c @@ -754,7 +754,7 @@ repo_add_patchxml(Repo *repo, FILE *fp, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_patchxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_patchxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_products.c b/tools/repo_products.c index 726dce70..def05bdb 100644 --- a/tools/repo_products.c +++ b/tools/repo_products.c @@ -438,8 +438,9 @@ repo_add_product(struct parsedata *pd, FILE *fp, int code11) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "%s: %s at line %u:%u\n", pd->filename, XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); - fprintf(stderr, "Skipping this product\n"); + pool_debug(pd->pool, SAT_ERROR, "%s: %s at line %u:%u\n", pd->filename, XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pd->pool, SAT_ERROR, "Skipping this product\n"); + XML_ParserFree(parser); return; } if (l == 0) @@ -525,7 +526,6 @@ repo_add_product(struct parsedata *pd, FILE *fp, int code11) s->provides = repo_addid_dep(pd->repo, s->provides, rel2id(pd->pool, s->name, s->evr, REL_EQ, 1), 0); } } - return; } diff --git a/tools/repo_repomdxml.c b/tools/repo_repomdxml.c index 2bb4fb03..3636364d 100644 --- a/tools/repo_repomdxml.c +++ b/tools/repo_repomdxml.c @@ -403,7 +403,7 @@ repo_add_repomdxml(Repo *repo, FILE *fp, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_repomdxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_repomdxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index 49f873df..c3433f5c 100644 --- a/tools/repo_rpmmd.c +++ b/tools/repo_rpmmd.c @@ -1135,7 +1135,7 @@ repo_add_rpmmd(Repo *repo, FILE *fp, const char *language, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_rpmmd: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_rpmmd: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_updateinfoxml.c b/tools/repo_updateinfoxml.c index 81d9cffd..5e4b1f8c 100644 --- a/tools/repo_updateinfoxml.c +++ b/tools/repo_updateinfoxml.c @@ -599,7 +599,7 @@ repo_add_updateinfoxml(Repo *repo, FILE *fp, int flags) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_updateinfoxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pool, SAT_FATAL, "repo_updateinfoxml: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); exit(1); } if (l == 0) diff --git a/tools/repo_zyppdb.c b/tools/repo_zyppdb.c index 0fa0c1d7..dc942814 100644 --- a/tools/repo_zyppdb.c +++ b/tools/repo_zyppdb.c @@ -317,14 +317,13 @@ repo_add_product(struct parsedata *pd, Repodata *data, FILE *fp) l = fread(buf, 1, sizeof(buf), fp); if (XML_Parse(parser, buf, l, l == 0) == XML_STATUS_ERROR) { - fprintf(stderr, "repo_zyppdb: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); + pool_debug(pd->pool, SAT_ERROR, "repo_zyppdb: %s at line %u:%u\n", XML_ErrorString(XML_GetErrorCode(parser)), (unsigned int)XML_GetCurrentLineNumber(parser), (unsigned int)XML_GetCurrentColumnNumber(parser)); return; } if (l == 0) break; } XML_ParserFree(parser); - return; }