<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - amdgpu-pro-install fails to install on openSUSE Leap 15.1 due to insufficient checks of $ID [PATCH included]"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=111402">111402</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>amdgpu-pro-install fails to install on openSUSE Leap 15.1 due to insufficient checks of $ID [PATCH included]
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/AMDgpu-pro
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>public_timo.s@silentcreek.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=145064" name="attach_145064" title="Simple fix that allows installing on openSUSE Leap 15.1">attachment 145064</a> <a href="attachment.cgi?id=145064&action=edit" title="Simple fix that allows installing on openSUSE Leap 15.1">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=111402&attachment=145064'>[review]</a>
Simple fix that allows installing on openSUSE Leap 15.1

Hi,

I downloaded the latest amdgpu-pro-19.30-844693-sle-15.tar.xz package from
amd.com and tried to install it on openSUSE Leap 15.1 following the docs [1].

The command
  $ ./amdgpu-pro-install --opencl=legacy --headless
failed with the following error:
  tee: /etc/yum.repos.d/amdgpu-pro-local.repo: No such file or directory

So, the installer seems to mistake my system for a RHEL/CentOS-based OS.

Looking at the code, I noticed the script gets the $ID from /etc/os-release
which in my case looks like this:
NAME="openSUSE Leap"
VERSION="15.1 "
ID="opensuse-leap"
[...]

The function yum_repo() in the script does not properly check the $ID, however.
It only matches against the strings 'sles', 'sled' and 'opensuse', but not
'opensuse-leap'. This is contrary to the function os_release() which matches
opensuse-leap as well (with a wildcard).

So, the solution to the issue is a simple wildcard. I'm attaching a patch that
allowed me to run the installer on openSUSE Leap 15.1.

Regards,

Timo


[1] <a href="https://amdgpu-install.readthedocs.io/en/latest/install-installing.html">https://amdgpu-install.readthedocs.io/en/latest/install-installing.html</a></pre>
        </div>
      </p>


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

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