aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install_megadrivers.py
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2019-03-21 09:09:20 -0700
committerDylan Baker <[email protected]>2019-03-22 19:09:00 +0000
commited96038e55b37501dae0be09287a6209a966eb85 (patch)
treeaf47da1cef0a591b03d4b27d9b01b2897a65b197 /bin/install_megadrivers.py
parent23d30f4099fac0e1fcbd7adf315a186f553e48d2 (diff)
bin/install_megadrivers.py: Fix regression for set DESTDIR
The previous patch tried to address a bug when DESTDIR is '', however, it introduces a bug when DESTDIR is not '', and fakeroot is used. This patch does fix that, and has been tested with the arch pkg-build to ensure it isn't regressed. Fixes: 093a1ade4e24b7dd701a093d30a71efd669fe9c8 ("bin/install_megadrivers.py: Correctly handle DESTDIR=''") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110221 Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'bin/install_megadrivers.py')
-rw-r--r--bin/install_megadrivers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
index f751c8329c4..ca543e5ce30 100644
--- a/bin/install_megadrivers.py
+++ b/bin/install_megadrivers.py
@@ -35,7 +35,11 @@ def main():
args = parser.parse_args()
if os.path.isabs(args.libdir):
- to = os.path.join(os.environ.get('DESTDIR', ''), args.libdir)
+ destdir = os.environ.get('DESTDIR')
+ if destdir:
+ to = os.path.join(destdir, args.libdir[1:])
+ else:
+ to = args.libdir
else:
to = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.libdir)