[Mesa-dev] [PATCH v5 07/13] meson: extend install_megadrivers script to handle symmlinking

Eric Engestrom eric.engestrom at imgtec.com
Tue Nov 21 10:39:44 UTC 2017


On Monday, 2017-11-20 11:09:39 -0800, Dylan Baker wrote:
> Which is required for the gallium media state trackers.
> 
> v4: - Make the full version the hard link and the partial so versiions
>       the symlinks
> v5: - drop --so-version all-together. Instead pass the full name of the
>       DSO and the script will automatically generate the appropriate
>       symlinks as necessary.

I'm ok with this solution :)
One typo in the commit title ("symmlinking" s/mm/m/), but this patch and
patch 8/13 are:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

(sorry for being a bit of a pain with the previous revisions of this patch)

I had a look at the rest of the series and didn't notice anything wrong,
but that's not an actual review.

> 
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  bin/install_megadrivers.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
> index a98d7dd177b..587a1f6726d 100755
> --- a/bin/install_megadrivers.py
> +++ b/bin/install_megadrivers.py
> @@ -44,10 +44,18 @@ def main():
>  
>      for each in args.drivers:
>          driver = os.path.join(to, each)
> +
>          if os.path.exists(driver):
>              os.unlink(driver)
>          print('installing {} to {}'.format(args.megadriver, driver))
>          os.link(master, driver)
> +
> +        name, ext = os.path.splitext(driver)
> +        while ext != '.so':
> +            if os.path.exists(name):
> +                os.unlink(name)
> +            os.symlink(driver, name)
> +            name, ext = os.path.splitext(name)
>      os.unlink(master)
>  
>  
> -- 
> 2.15.0
> 


More information about the mesa-dev mailing list