[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
Wed Mar 20 15:26:43 UTC 2019


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

            Bug ID: 110211
           Summary: If DESTDIR is set to an empty string, the dri drivers
                    are not installed
           Product: Mesa
           Version: 19.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Other
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: pierre.labastie at neuf.fr
        QA Contact: mesa-dev at lists.freedesktop.org

Dear maintainer,

The script "bin/install_megadrivers.py" contains the following:
---
if os.path.isabs(args.libdir):
        to = os.path.join(os.environ.get('DESTDIR', '/'), args.libdir[1:])
    else:
        to = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'],
args.libdir)
---
The issue is when libdir is absolute, and DESTDIR is set to the empty string.
This is very likely to occur in build scripts of the form (many of us at
http://www.linuxfromscratch.org do that):
---
#PKG_DEST=/some/where
...
DESTDIR=$PKG_DEST ninja install
---
where we comment out the PKG_DEST assignment or not, depending on whether we
want a DESTDIR install or not.

Then the "to" variable becomes a relative path, and the drivers are not
installed. This is not really what is expected, I guess. I'd suggest using (but
I am far from being a Python geek):
---
if os.path.isabs(args.libdir):
        to = os.path.join(os.environ.get('DESTDIR', ''), args.libdir)
---
That worked for me in all cases I have tried (may not have thought of all of
them...)

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


More information about the mesa-dev mailing list