varexpand: handle backslashes like more like bash
authorZac Medico <zmedico@gentoo.org>
Tue, 28 Jun 2011 09:06:36 +0000 (02:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 28 Jun 2011 09:06:36 +0000 (02:06 -0700)
commite63823dd8358f50559fa616313cdde3ceaf104ed
tree3d99c770fdcf27e6f519d160b1da737f46772ea6
parent8ff8b0aad08d1381aeb410807881b46ba4bc7135
varexpand: handle backslashes like more like bash

For backslash expansion, this function used to behave like echo
-e, but that's not needed for our purposes. We want to behave like
bash does when expanding a variable assignment in a sourced file,
in which case it performs backslash removal for \\ and \$ but nothing
more. This will fix bash compatibility for the case reported in
bug #365033.
pym/portage/tests/util/test_varExpand.py
pym/portage/util/__init__.py