Backslashes on Windows
This came up in a recent CI run:
Traceback (most recent call last):
File "<string>", line 21, in <module>
File "C:\projects\portmod\portmod\wrapper.py", line 252, in main
args.func(args)
File "C:\projects\portmod\portmod\wrapper.py", line 93, in wrapper_pybuild
pkg_func(pkg, "src_prepare")
File "C:\projects\portmod\portmod\wrapper.py", line 85, in pkg_func
return func()
File "C:\projects\portmod\test\testrepo\test\test\test-1.0.pybuild", line 25, in src_prepare
assert re.match(r"\[foo\]", "[foo]")
AssertionError
I think the original test to this was buried as it was triggered implicitly by being embedded in one of the test repo's pybuilds. We should instead create an explicit test, but the problem of course also needs to be fixed.
I've run into this before (assuming it's the same problem), where somewhere in the pipeline of loading the pybuild the escapes end up escaping the character that follows them, rather than being passed to the python interpreter as a literal escape. Previously this had been handled by doubling the escapes, but I thought that I'd found the reason that the string was being "evaluated", so to speak, and removed the doubling code.
It's definitely only occurring on Windows though, and I'm not sure why, at this point, there would be a difference between the platforms with respect to how the packages are parsed.