From: Martin Schwenke Date: Thu, 13 Sep 2018 00:54:48 +0000 (+1000) Subject: wafsamba: Only use $DESTDIR in INSTALL_DIR() if it is set X-Git-Tag: tdb-1.3.17~1631 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93d72bcfb0dea3d7734771bbb550c45d642955c9;p=thirdparty%2Fsamba.git wafsamba: Only use $DESTDIR in INSTALL_DIR() if it is set 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 Signed-off-by: Martin Schwenke Reviewed-by: Alexander Bokovoy Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Thu Sep 13 09:37:23 CEST 2018 on sn-devel-144 --- diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index dbcfe12aaca..36bc6c36483 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -897,8 +897,9 @@ 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, destpath.lstrip(os.sep)) if bld.is_install > 0: if not os.path.isdir(destpath):