• Iain Lane's avatar
    runner: Fix sed command for escaping special characters in package names · e3aa1cea
    Iain Lane authored
    Before:
    
      + sed -n /Candidate:/ { s/^.* //; /none/d; p}
      + sed+ echo -r s/([.+])/\/g libglib2.0-0
    
      + apt-cache policy ^libglib20-0$
      + pkg_candidate=
    
    The '.' in the package name is removed (note the '/\/g' in the sed
    command).
    
    After:
    
      + sed -n /Candidate:/ { s/^.* //; /none/d; p}
      + sed+ echo -r s/([.+])/\\\1/g libglib2.0-0
    
      + apt-cache policy ^libglib2\.0-0$
      + pkg_candidate=2.58.1-2
    
    We need a stupid number of backslashes to protect the escapes all the
    way through the python string and subshells to the actual sed command.
    
    Add a testcase for this too.
    e3aa1cea
Name
Last commit
Last update
..
home/.ssh Loading commit data...
testclick Loading commit data...
testpkg Loading commit data...
testpkg-reboot/debian/tests Loading commit data...
testpkg-reboot-prepare/debian/tests Loading commit data...
testpkg-simple/debian/tests Loading commit data...
autopkgtest Loading commit data...
autopkgtest_args Loading commit data...
pycodestyle Loading commit data...
pyflakes Loading commit data...
run-parallel Loading commit data...
ssh-setup-lxd Loading commit data...
testarchive.py Loading commit data...
testclick_0.1_all.click Loading commit data...
testdesc Loading commit data...