[Mesa-dev] [Bug 110211] If DESTDIR is set to an empty string, the dri drivers are not installed

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 21 15:41:17 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110211

--- Comment #8 from Pierre Labastie <pierre.labastie at neuf.fr> ---
(In reply to Benoit Pierre from comment #6)
> Created attachment 143747 [details] [review]
> fix DESTDIR handling in install_megadrivers.py
> 
> This how I fixed it locally. I only tested the PKGBUILD on Arch Linux (so
> with DESTDIR set). I tried to ensure Windows is correctly supported to (with
> the correct drive being used in all cases).

Looks like your patch comes back to the original issue:
This is Ok if DESTDIR is not set, or if DESTDIR is set to a non empty string,
but not if DESTDIR is set to an empty string. Note that this is because
os.path.join is not consistent:
a slash is inserted when doing os.path.join('a','b'), but not when doing
os.path.joint('','b')!

Note that the fix I proposed is bad (sorry): 
if you do, for instance, "to = os.path.join('/sources/install','/usr/lib/dri')"
in python, then "to" is set to '/usr/lib/dri'... My bad (I thought I had
tried).

Maybe something like (I'm not sure what to do with win32):
---
if os.path.isabs(args.libdir):
    destdir=os.environ.get('DESTDIR','')
    if len(destdir) == 0:
        destdir = '/'
    to = os.path.join(destdir, args.libdir[1:])
  else:
...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190321/513bd711/attachment.html>


More information about the mesa-dev mailing list