From d749e70d786a1cb6d85afa01e431fc9ca61dd635 Mon Sep 17 00:00:00 2001 From: Kiriti Gowda Date: Thu, 2 May 2024 05:44:00 -0700 Subject: [PATCH] Setup - Fix U22 (#331) * Setup - Fix U22 * Print - Traceback [ROCm/rocdecode commit: 2e4b7e55ea4085306e241e3ce5d775baf3e970db] --- projects/rocdecode/rocDecode-setup.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/rocdecode/rocDecode-setup.py b/projects/rocdecode/rocDecode-setup.py index c608c6bae1..eee0b38154 100644 --- a/projects/rocdecode/rocDecode-setup.py +++ b/projects/rocdecode/rocDecode-setup.py @@ -22,6 +22,7 @@ import os import sys import argparse import platform +import traceback if sys.version_info[0] < 3: import commands else: @@ -37,6 +38,7 @@ def ERROR_CHECK(call): status = call if(status != 0): print('ERROR_CHECK failed with status:'+str(status)) + traceback.print_stack() exit(status) # Arguments @@ -181,10 +183,11 @@ if "Ubuntu" in platfromInfo: for i in range(len(coreDebianPackages)): ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall + ' '+linuxSystemInstall_check+' install '+ coreDebianPackages[i])) - if "22.04" in platform.version(): - for i in range(len(coreDebianU22Packages)): - ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall + - ' '+linuxSystemInstall_check+' install '+ coreDebianU22Packages[i])) + with open('/etc/os-release') as f: + if '22' in f.read(): + for i in range(len(coreDebianU22Packages)): + ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall + + ' '+linuxSystemInstall_check+' install '+ coreDebianU22Packages[i])) else: for i in range(len(coreRPMPackages)): ERROR_CHECK(os.system('sudo '+linuxFlag+' '+linuxSystemInstall +