[tex-live] Bug#489943: texlive-base-bin: mktexpk does not work in directories containing spaces

Karl Berry karl at freefriends.org
Wed Jul 9 02:19:31 CEST 2008


Thanks for the report, but ...

    > However I also noticed use of echo+sed dirname replacement (with comment
    > "can't rely on dirname" -- basename was relied on on the next line though),

Well, that's because basename can be relied on :).

    > which would have problems with spaces at the end (backquote expansion eats
    > them) and backslashes in some shells (the rules for backslash processing in
    > echo differ from shell to shell). So my patch additionally includes

I am not surprised that there are failures with names containing spaces,
let alone backslashes.  And since we want to move away from shell
scripts in general (-> texlua, so we can run the same code on Windows),
I doubt it's worth anyone's time to do a in-depth exegesis of all the
failures.

    > -PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname

I am not aware of any way to improve on the portability of this
construct.  POSIX is certainly not the answer.  Something to take up on
the autoconf list if you really want to.

    > -cd $PKDESTDIR || exit 1
    > +cd "$PKDESTDIR" || exit 1

That change was already made.

Best,
karl


More information about the tex-live mailing list