<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - If DESTDIR is set to an empty string, the dri drivers are not installed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110211#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - If DESTDIR is set to an empty string, the dri drivers are not installed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110211">bug 110211</a>
              from <span class="vcard"><a class="email" href="mailto:pierre.labastie@neuf.fr" title="Pierre Labastie <pierre.labastie@neuf.fr>"> <span class="fn">Pierre Labastie</span></a>
</span></b>
        <pre>(In reply to Benoit Pierre from <a href="show_bug.cgi?id=110211#c6">comment #6</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=143747" name="attach_143747" title="fix DESTDIR handling in install_megadrivers.py">attachment 143747</a> <a href="attachment.cgi?id=143747&action=edit" title="fix DESTDIR handling in install_megadrivers.py">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=110211&attachment=143747'>[review]</a> [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).</span >

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:
...</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>