[PATCH] wafsamba: Only use $DESTDIR in INSTALL_DIR() if it is set
Alexander Bokovoy
ab at samba.org
Thu Sep 13 04:11:38 UTC 2018
On to, 13 syys 2018, Martin Schwenke via samba-technical wrote:
> Otherwise the leading '/' is stripped and directories are created
> relative to the current directory.
>
> This fixes a regression introduced in recent commit
> 26ea0f58daace4adef7c5bb17f19476083bf3b7b.
>
> Please review and maybe push...
>
> peace & happiness,
> martin
> From bb8e42b3d46ccf9688f85cb6ba590d9b8f9b10d0 Mon Sep 17 00:00:00 2001
> From: Martin Schwenke <martin at meltin.net>
> Date: Thu, 13 Sep 2018 10:54:48 +1000
> Subject: [PATCH] wafsamba: Only use $DESTDIR in INSTALL_DIR() if it is set
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Otherwise the leading '/' is stripped and directories are created
> relative to the current directory.
>
> This fixes a regression introduced in recent commit
> 26ea0f58daace4adef7c5bb17f19476083bf3b7b.
>
> Reported-by: Ralph Böhme <slow at samba.org>
> Signed-off-by: Martin Schwenke <martin at meltin.net>
> ---
> buildtools/wafsamba/wafsamba.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
> index dbcfe12aaca..7fdcb17e859 100644
> --- a/buildtools/wafsamba/wafsamba.py
> +++ b/buildtools/wafsamba/wafsamba.py
> @@ -897,8 +897,10 @@ def INSTALL_DIR(bld, path, chmod=0o755, env=None):
> if not path:
> return []
>
> - destpath = os.path.join(Options.options.destdir,
> - bld.EXPAND_VARIABLES(path).lstrip(os.sep))
> + destpath = bld.EXPAND_VARIABLES(path)
> + if Options.options.destdir:
> + destpath = os.path.join(Options.options.destdir,
> + bld.EXPAND_VARIABLES(destpath).lstrip(os.sep))
Why do you need to run EXPAND_VARIABLES twice?
--
/ Alexander Bokovoy
More information about the samba-technical
mailing list