[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: quilt + dpkg + debhelper: Handling upstream files containing spaces

Mike Gabriel:
> Hi all,
> I am a little clueless about the below. I hope that someone can shed
> some light or provide a work-around.
> I am currently working on OpenBoard packaging. OpenBoard ships loads of
> embedded jquery.* copies of code (and other JS libs, too).
> Those jquery.* et al. files are in folder paths that contain blanks.
> Ouch. It seems that our tool chain components fail completely on
> handling them. Or maybe I am doing entirely wrong.

Yupe, that is https://bugs.debian.org/198507 (as Dominique mentioned).

I am happy to work with someone on fixing this while ensuring dh-exec
keeps working.  FTR: dh-exec is orphaned and I have no plans to pick it
up as I want a higher bus factor than 1 in our low level packaging stack.

> ** Approach 1 **:
> While repacking, remove all those jquery.* et al. files and replace them
> in the installed package via symlinks to /usr/share/javascript/jquery*.
> So, I placed a debhelper file (debian/openboard-common.links) into the
> package folder and populated it with symlink dests and targets. Of
> course, I frowned at myself and
>   * quoted those dirs containing strings with double quotes
>   * ... with single quotes
>   * ... tried with dh-exec and quotes
>   * ... tried it with backslash + blank escpaing
> ... but to no avail...

For most other cases, you can "work around" the issue by (ab)using globs
(e.g. ? or *) as there are rarely another path with the same name modulo
space replaced by another glyph.  But even that fails here as dh_link do
not use globs AFAIR.

However, for dh_link you *can* pass the file names as arguments and it
will work:

  dh_link -pfoo "path with space" "another path with even more spaces"

Which still leaves much to be wanted, but it works.

(Sadly, this is made worse by dh_install and others "splitting" properly
quoted paths because people have started to rely on the argument being
split.  The result is that is helpers are inconsistent about how they
handle spaces in arguments and the result is much sadness /o\)

Anyway, hope it helps.


Reply to: