From: Michael Schroeder Date: Fri, 8 Apr 2022 11:43:39 +0000 (+0200) Subject: Special case file dependencies in the testcase writer X-Git-Tag: 0.7.23~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e1ac6aaa91c6db34ff82ddc604a4c2483c3aaac;p=thirdparty%2Flibsolv.git Special case file dependencies in the testcase writer There's special casing in the reader, so we have to make sure that complex dependencies starting with a '/' are written correctly. --- diff --git a/ext/repo_testcase.c b/ext/repo_testcase.c index 38676efd..29dd8c0f 100644 --- a/ext/repo_testcase.c +++ b/ext/repo_testcase.c @@ -388,7 +388,13 @@ writedeps(Repo *repo, FILE *fp, const char *tag, Id key, Solvable *s, Offset off fprintf(fp, "+%s\n", tag); tagwritten = 1; } - fprintf(fp, "%s\n", idstr); + if (*idstr == '/' && !ISRELDEP(id)) { + fprintf(fp, "%s\n", pool_id2str(pool, id)); + } else if (*idstr == '/') { + fprintf(fp, "\\2f%s\n", idstr + 1); + } else { + fprintf(fp, "%s\n", idstr); + } } if (tagwritten) fprintf(fp, "-%s\n", tag);