sed expression in tools/tox-venv is not POSIX compatible
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Low
|
Unassigned |
Bug Description
When running tools/tox-venv py3 on FreeBSD, I get the following Error:
sed: 2: ":x; /\\$/ { N; s/\\\n[ ...": unused label 'x; /\\$/ { N; s/\\\n[ ]*//; tx };'
This suggests to me, that the expression
sed -e ':x; /\\$/ { N; s/\\\n[ ]*//; tx };' "${tox_ini}" |
is not POSIX compatible.
Looking at GNU sed's documentation, I see the first issue with making this expression POSIX compliant will be that `N` behaves intentionally different on GNU sed than on POSIX:
https:/
So the solution here might be simply to require GNU sed, and put it's path/name into an environment variable that can be overriden from the outside.
Triaging this as Low, as there's generally a way to do whatever tox-venv does without using that script.