• 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
..
autopkgtest Loading commit data...
autopkgtest.1 Loading commit data...