[Mesa-dev] [PATCH v5 07/13] meson: extend install_megadrivers script to handle symmlinking
Dylan Baker
dylan at pnwbakers.com
Mon Nov 20 19:09:39 UTC 2017
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.
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