Package: python
Severity: minor

Hi,

on Debian stable (please close if already fixed in sid):

$ fgrep ' \' /usr/share/debhelper/autoscripts/prerm-pyclean
        dpkg -L #PACKAGE# | grep \.py$ | while read file

The \ is not passed to grep, instead it is used to quote the . in the
shell.

Correct would be:
        dpkg -L #PACKAGE# | grep \\.py$ | while read file

Or even better:
        dpkg -L #PACKAGE# | grep '\.py$' | while read file

To test shell quoting, these commands can be used:
        printf '%s\n' \.
        printf '%s\n' \\.
        printf '%s\n' '\'


Carsten

P.S.: IMHO “read -r” would make more sense than “read”

Reply via email to