From 5e1ac6aaa91c6db34ff82ddc604a4c2483c3aaac Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Fri, 8 Apr 2022 13:43:39 +0200 Subject: [PATCH] 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. --- ext/repo_testcase.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- 2.47.2