osbuild-run: make update-ca-trust optional

This is a RHism, that is not available on Debian-based systems.
Do not make it a hard reqirement, as pipelines may be able to
function just fine without it.

In a follow-up commit we will also check for the Debian-based
equivalent.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-07-29 15:50:32 +02:00 committed by Lars Karlitski
parent 9fa827ab04
commit d08aed8f12

View file

@ -1,5 +1,6 @@
#!/usr/bin/python3
import shutil
import os
import subprocess
import sys
@ -20,6 +21,9 @@ def sysusers():
def update_ca_trust():
if not shutil.which("update-ca-trust"):
return
# generate /etc/pki/tls/certs/ca-bundle.crt
os.makedirs("/etc/pki/ca-trust/extracted/pem")
os.makedirs("/etc/pki/tls/certs")