We can't use the same command sequence as for CentOS and Fedora.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/lcitool | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/guests/lcitool b/guests/lcitool
index 9958508..d862282 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -767,10 +767,20 @@ class Application:
commands.extend([
"{package_manager} update -y",
"{package_manager} install -y {pkgs}",
- "{package_manager} autoremove -y",
- "{package_manager} clean all -y",
])
+ # openSUSE doesn't seem to have a convenient way to remove all
+ # unnecessary packages, but CentOS and Fedora do
+ if os_name == "OpenSUSE":
+ commands.extend([
+ "{package_manager} clean --all",
+ ])
+ else:
+ commands.extend([
+ "{package_manager} autoremove -y",
+ "{package_manager} clean all -y",
+ ])
+
script = "\nRUN " + (" && \\\n
".join(commands)) + "\n"
sys.stdout.write(script.format(**varmap))
--
2.23.0