2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-12 11:06:17 +00:00

Fail imgutil build when apt fails in an Ubuntu image

DebHandler raised SystemExit on a failed apt-get, but prep_root runs
under run_constrained, which only catches Exception and otherwise exits
0. A failed package install was therefore reported as a successful
build. Raise an Exception instead, as ElHandler already does.
This commit is contained in:
Markus Hilger
2026-11-01 12:24:51 +01:00
parent 89787671cf
commit e70f66d2df
+2 -1
View File
@@ -797,7 +797,8 @@ class DebHandler(OsHandler):
if rc:
sys.stderr.write('{0} failed with exit code {1}\n'.format(
' '.join(cmd), rc))
raise SystemExit(rc)
# not SystemExit, run_constrained would turn it into success
raise Exception('apt failed in image')
def prep_root(self, args):
mkdirp(os.path.join(self.targpath, 'etc/apt'))