[systemd-devel] [PATCH] build-sys: Fix move-to-rootlibdir

Lennart Poettering lennart at poettering.net
Tue Mar 11 15:42:06 PDT 2014


On Tue, 11.03.14 18:14, Mike Gilbert (floppym at gentoo.org) wrote:

> Since we now use ln -s --relative, using this sed statement is redundant
> and causes broken symlinks to be installed.

Hmm, wouldn't it be nicer to just drop the --relative here?

Quite honestly, I don't grok the code, neither the old nor the new one...

> ---
>  Makefile.am | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 182eca6..bd78f44 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -207,9 +207,8 @@ define move-to-rootlibdir
>  	if test "$(libdir)" != "$(rootlibdir)"; then \
>  		$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
>  		so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
> -		so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
>  		rm -f $(DESTDIR)$(libdir)/$$libname && \
> -		$(LN_S) --relative -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
> +		$(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
>  		mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
>  	fi
>  endef


Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list