[systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

Filipe Brandenburger filbranden at google.com
Fri May 29 10:37:23 PDT 2015


Hi Daniel,

I haven't tested it, but I do have a few comments.

First, why not use "rootlibdir" instead of "rootprefixlibdir"? There's
already similar "rootbindir" and "rootlibexecdir" defined there, so I
think we could stick to the same convention.

>From a few lines down in Makefile.am:

  # And these are the special ones for /
  rootprefix=@rootprefix@
  rootbindir=$(rootprefix)/bin
  rootlibexecdir=$(rootprefix)/lib/systemd

On Fri, May 29, 2015 at 2:05 AM, Daniel Mack <daniel at zonque.org> wrote:
> I had to introduce a new entity in custom-entites.ent, because with
> "--with-rootprefix=/", "&rootprefix;/lib" resolves to "//lib", and with
> the default behaviour of configure, "&rootprefix;lib" becomes "/usrlib".

Debian is already using --with-rootprefix= (an empty string) exactly
for that reason.
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules#n16

If rootprefix=/, there would be also problems with rootbindir=//bin
and other such definitions getting double slashes.

Having said that, I do agree that it would be nice to handle
--with-rootprefix=/ correctly without creating double slashes, but I
think it would be preferrable to handle that in general and not for
the specific case of /lib.

Perhaps just remove any trailing slashes from rootprefix in
configure.ac instead before generating the Makefile? That would also
handle cases like --with-rootprefix=/usr/ to still generate /usr/bin
and /usr/lib correctly.

In any case, handling trailing slashes/double slashes could come on a
separate patch. As pointed out, the problem with it already exists and
Debian is working around it by setting rootprefix to an empty string,
so it's not really strictly required for the rootlibdir patch itself.

I'd be glad to test a new patchset that addresses these suggestions.

Cheers,
Filipe


More information about the systemd-devel mailing list