Re: [Mesa-dev] [PATCH 2/3] meson: use relative paths in megadriver symlinks

2018-03-08 Thread Dylan Baker
Quoting Dylan Baker (2018-03-08 11:25:20)
> Quoting Greg V (2018-03-06 11:16:04)
> > e.g. libvdpau_radeonsi.so(.1(.0)) were pointing to the absolute
> > build-time path of libvdpau_radeonsi.so.1.0.0, which caused trouble
> > when packaging the libraries.
> > ---
> >  bin/install_megadrivers.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
> > index 86bfa35918..ce947b4332 100755
> > --- a/bin/install_megadrivers.py
> > +++ b/bin/install_megadrivers.py
> > @@ -58,7 +58,7 @@ def main():
> >  while ext != '.so':
> >  if os.path.exists(name):
> >  os.unlink(name)
> > -os.symlink(driver, name)
> > +os.symlink(os.path.relpath(driver), name)
> 
> I think that driver is wrong here, I think that this should be
> `os.symlink(each, name)`
> 
> In my testing these generated the same code.

By "these" I mean os.path.relpath(driver) and each

> 
> Dylan
> 
> >  name, ext = os.path.splitext(name)
> >  finally:
> >  os.chdir(ret)
> > -- 
> > 2.16.2
> > 
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/3] meson: use relative paths in megadriver symlinks

2018-03-08 Thread Dylan Baker
Quoting Greg V (2018-03-06 11:16:04)
> e.g. libvdpau_radeonsi.so(.1(.0)) were pointing to the absolute
> build-time path of libvdpau_radeonsi.so.1.0.0, which caused trouble
> when packaging the libraries.
> ---
>  bin/install_megadrivers.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
> index 86bfa35918..ce947b4332 100755
> --- a/bin/install_megadrivers.py
> +++ b/bin/install_megadrivers.py
> @@ -58,7 +58,7 @@ def main():
>  while ext != '.so':
>  if os.path.exists(name):
>  os.unlink(name)
> -os.symlink(driver, name)
> +os.symlink(os.path.relpath(driver), name)

I think that driver is wrong here, I think that this should be
`os.symlink(each, name)`

In my testing these generated the same code.

Dylan

>  name, ext = os.path.splitext(name)
>  finally:
>  os.chdir(ret)
> -- 
> 2.16.2
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/3] meson: use relative paths in megadriver symlinks

2018-03-08 Thread Dylan Baker
Quoting Greg V (2018-03-06 11:16:04)
> e.g. libvdpau_radeonsi.so(.1(.0)) were pointing to the absolute
> build-time path of libvdpau_radeonsi.so.1.0.0, which caused trouble
> when packaging the libraries.
> ---
>  bin/install_megadrivers.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
> index 86bfa35918..ce947b4332 100755
> --- a/bin/install_megadrivers.py
> +++ b/bin/install_megadrivers.py
> @@ -58,7 +58,7 @@ def main():
>  while ext != '.so':
>  if os.path.exists(name):
>  os.unlink(name)
> -os.symlink(driver, name)
> +os.symlink(os.path.relpath(driver), name)
>  name, ext = os.path.splitext(name)
>  finally:
>  os.chdir(ret)
> -- 
> 2.16.2
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

I'm looking at this right now, my gut is telling me this is wrong, but I don't
know why. I'm looking at it right now.


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/3] meson: use relative paths in megadriver symlinks

2018-03-08 Thread Emil Velikov
On 6 March 2018 at 19:16, Greg V  wrote:
> e.g. libvdpau_radeonsi.so(.1(.0)) were pointing to the absolute
> build-time path of libvdpau_radeonsi.so.1.0.0, which caused trouble
> when packaging the libraries.

Patch looks correct, although CC-ing Dylan as our resident python expert.

Fixes: f7f1b30f81e ("meson: extend install_megadrivers script to
handle symmlinking")
Reviewed-by: Emil Velikov 

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/3] meson: use relative paths in megadriver symlinks

2018-03-06 Thread Greg V
e.g. libvdpau_radeonsi.so(.1(.0)) were pointing to the absolute
build-time path of libvdpau_radeonsi.so.1.0.0, which caused trouble
when packaging the libraries.
---
 bin/install_megadrivers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
index 86bfa35918..ce947b4332 100755
--- a/bin/install_megadrivers.py
+++ b/bin/install_megadrivers.py
@@ -58,7 +58,7 @@ def main():
 while ext != '.so':
 if os.path.exists(name):
 os.unlink(name)
-os.symlink(driver, name)
+os.symlink(os.path.relpath(driver), name)
 name, ext = os.path.splitext(name)
 finally:
 os.chdir(ret)
-- 
2.16.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev