[debhelper-devel] Bug#198507: dh_install: fails if filenames have an embedded space

Gergely Nagy algernon at madhouse-project.org
Thu Oct 6 08:12:39 UTC 2016


>>>>> "Niels" == Niels Thykier <niels at thykier.net> writes:

    >> [...]
    >> 
    >> You only need to teach debhelper to handle the \-escaped spaces.
    >> 

    Niels> I am not really sure I want to use \-escaped spaces. Besides being a
    Niels> pain in themselves, it would also suggest that the glob characters can
    Niels> be escaped.  Which leads us to Joey Hess's comment in #198507#17.

    Niels> If we go down that route of backslash escaped characters, I inclined to
    Niels> go all in with Text::ParseWords's shellwords/parse_line from the beginning.

    Niels> Would that still be doable in the dh-exec end?

Yep. All the funny parts of dh-exec are implemented in Perl, so I can
use the same libraries Debhelper does. When deciding what language to
use for the scripts, Perl was chosen because Debhelper is in Perl, too.

On a crazy note, I could even make dh-exec do the parsing, replace all
spaces with ?, or do some other trickery, like copying the file to a
unique directory, and replacing the line with DIR/*. That way, debhelper
wouldn't need to change anything at all. But this would be crazy. ;)

-- 
|8]




More information about the debhelper-devel mailing list