[PATCH] wafsamba: Only use $DESTDIR in INSTALL_DIR() if it is set

Martin Schwenke martin at meltin.net
Thu Sep 13 04:24:03 UTC 2018


On Thu, 13 Sep 2018 07:11:38 +0300, Alexander Bokovoy <ab at samba.org>
wrote:

> 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?

Because I am an idiot who was in a hurry.  Thanks for noticing!  :-)

New version attached...

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-wafsamba-Only-use-DESTDIR-in-INSTALL_DIR-if-it-is-se.patch
Type: text/x-patch
Size: 1376 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180913/ce56f19d/0001-wafsamba-Only-use-DESTDIR-in-INSTALL_DIR-if-it-is-se.bin>


More information about the samba-technical mailing list