Skip to content

Commit 5e1ac6a

Browse files
committed
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.
1 parent ea114b2 commit 5e1ac6a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ext/repo_testcase.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,13 @@ writedeps(Repo *repo, FILE *fp, const char *tag, Id key, Solvable *s, Offset off
388388
fprintf(fp, "+%s\n", tag);
389389
tagwritten = 1;
390390
}
391-
fprintf(fp, "%s\n", idstr);
391+
if (*idstr == '/' && !ISRELDEP(id)) {
392+
fprintf(fp, "%s\n", pool_id2str(pool, id));
393+
} else if (*idstr == '/') {
394+
fprintf(fp, "\\2f%s\n", idstr + 1);
395+
} else {
396+
fprintf(fp, "%s\n", idstr);
397+
}
392398
}
393399
if (tagwritten)
394400
fprintf(fp, "-%s\n", tag);

0 commit comments

Comments
 (0)