From aeeb3daa809f6a0c1325dc31e6f09a17546e9558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 29 Jan 2021 22:59:14 +0100 Subject: [PATCH] qvm-template: handle template extraction failure QubesOS/qubes-issues#2534 --- qubesadmin/tools/qvm_template.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qubesadmin/tools/qvm_template.py b/qubesadmin/tools/qvm_template.py index f16fdde..1ca2135 100644 --- a/qubesadmin/tools/qvm_template.py +++ b/qubesadmin/tools/qvm_template.py @@ -907,8 +907,9 @@ def install( for rpmfile, reponame, name, package_hdr in verified_rpm_list: with tempfile.TemporaryDirectory(dir=TEMP_DIR) as target: print('Installing template \'%s\'...' % name, file=sys.stderr) - # FIXME: Handle return value - extract_rpm(name, rpmfile, target) + if not extract_rpm(name, rpmfile, target): + raise Exception( + 'Failed to extract {} template'.format(name)) cmdline = [ 'qvm-template-postprocess', '--really',