Skip to content
Commit 3e0dbfde authored by Gert Wollny's avatar Gert Wollny Committed by Dylan Baker
Browse files

meson, install_megadrivers: Also remove stale symlinks



os.path.exists doesn't return True for stale symlinks, but they are in
the way later, when a link/file with the same name is to be created.
For instance it is conceivable that the pointed to file is replaced by
a file with a new name, and then the symlink is dead.

To handle this check specifically for all existing symlinks to be
removed. (This bugged me for some time with a link libXvMCr600.so
always being in the way of installing this file)

v2: use only os.lexist and replace all instances of os.exist (Dylan Baker)

v3: handle directory check correctly (Eric Engestrom)

Fixes: f7f1b30f
       ("meson: extend install_megadrivers script to handle symmlinking")

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>(v2 minus dir check)
Reviewed-by: default avatarDylan Baker <dylan@pnwbakers.com>
Signed-off-by: default avatarGert Wollny <gert.wollny@collabora.com>
(cherry picked from commit 7a46b2d6)
Conflicts resolved by Dylan

Conflicts:
	bin/install_megadrivers.py
parent 3ca69de0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment