File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 163163# OS package handler name constants
164164RPM = 'rpm'
165165DPKG = 'dpkg'
166+ ZYPPER = 'zypper'
166167
167168SYSTEM_TOOLS = {
168169 '7z' : "extracting sources (.iso)" ,
178179 'tar' : "unpacking source files (.tar)" ,
179180 'unxz' : "decompressing source files (.xz, .txz)" ,
180181 'unzip' : "decompressing files (.zip)" ,
182+ ZYPPER : "checking OS dependencies (openSUSE)" ,
181183}
182184
183185SYSTEM_TOOL_CMDS = {
@@ -785,14 +787,17 @@ def check_os_dependency(dep):
785787 os_to_pkg_cmd_map = {
786788 'centos' : RPM ,
787789 'debian' : DPKG ,
790+ 'opensuse' : ZYPPER ,
788791 'redhat' : RPM ,
792+ 'rhel' : RPM ,
789793 'ubuntu' : DPKG ,
790794 }
791795 pkg_cmd_flag = {
792796 DPKG : '-s' ,
793797 RPM : '-q' ,
798+ ZYPPER : 'search -i' ,
794799 }
795- os_name = get_os_name ()
800+ os_name = get_os_name (). lower (). split ( ' ' )[ 0 ]
796801 if os_name in os_to_pkg_cmd_map :
797802 pkg_cmds = [os_to_pkg_cmd_map [os_name ]]
798803 else :
You can’t perform that action at this time.
0 commit comments