DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, nick.connolly@mayadata.io, stable@dpdk.org,
	Narcisa Vasile <navasile@linux.microsoft.com>
Subject: Re: [dpdk-dev] [PATCH] build: fix install from arbitrary directory for meson 0.55
Date: Wed, 18 Aug 2021 23:55:33 +0300	[thread overview]
Message-ID: <20210818235533.768302dc@sovereign> (raw)
In-Reply-To: <YRvJN/3O49QkTyNg@bricha3-MOBL.ger.corp.intel.com>

2021-08-17 15:35 (UTC+0100), Bruce Richardson:
> On Wed, Aug 11, 2021 at 02:03:22AM +0300, Dmitry Kozlyuk wrote:
> > Install command for meson >= 0.55.0 referenced the script by a plain
> > string, assuming the build directory to be directly under the source
> > tree root. This resulted in an error when the assumption did not hold:
> > 
> >     c:\python\python.exe: can't open file
> >     '../buildtools/symlink-drivers-solibs.py':
> >     [Errno 2] No such file or directory
> > 
> > Use files() to make a valid script path for any build directory.
> > 
> > Fixes: cd27047dbee1 ("build: support drivers symlink on Windows")
> > Cc: nick.connolly@mayadata.io
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > ---
> > Note: this is not limited to Windows, it just happens that Windows
> > requires newer meson and the error example is from Windows build.
> > 
> >  config/meson.build | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/config/meson.build b/config/meson.build
> > index e80421003b..3b5966ec2f 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -61,7 +61,8 @@ if not is_windows
> >              get_option('libdir'), pmd_subdir_opt)
> >  elif meson.version().version_compare('>=0.55.0')
> >      # 0.55.0 is required to use external program with add_install_script
> > -    meson.add_install_script(py3, '../buildtools/symlink-drivers-solibs.py',
> > +    meson.add_install_script(py3,
> > +            files('../buildtools/symlink-drivers-solibs.py'),
> >              get_option('libdir'), pmd_subdir_opt, get_option('bindir'))
> >  endif
> >    
> 
> Rather than using a relative path, we could also use "files()" in the
> buildtools directory and store it in a variable to re-use either. Most
> other python scripts in the buildtools directory, use that pattern to have
> a single (array) variable with the python and script calls together.

Thanks for the hint, but I don't think consistency is worth it.
Now we have some non-trivial logic (otherwise it wouldn't need comments)
in one place. With variable definition affected by the single use case in
another file it will be harder to understand the reason.

> Either way as here, or with buildtools change:
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>


  reply	other threads:[~2021-08-18 20:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 23:03 Dmitry Kozlyuk
2021-08-17 14:35 ` Bruce Richardson
2021-08-18 20:55   ` Dmitry Kozlyuk [this message]
2021-08-27 19:44   ` Thomas Monjalon
2021-08-23 12:41 ` Nick Connolly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818235533.768302dc@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=navasile@linux.microsoft.com \
    --cc=nick.connolly@mayadata.io \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).