core: check that extensions have the hierarchies before overlaying
authorLuca Boccassi <bluca@debian.org>
Wed, 1 Nov 2023 19:39:37 +0000 (19:39 +0000)
committerLuca Boccassi <bluca@debian.org>
Fri, 3 Nov 2023 16:59:58 +0000 (16:59 +0000)
commitf0304df6e4595e7b780c2772881aaacfac40c9f5
tree3ca1ed3f65e1a0275469eac7e3c1a4eed864d440
parenta39cba252ede11013b600dd858c9459bb707d663
core: check that extensions have the hierarchies before overlaying

Before confext was added, hierarchies always existed in extensions. Now
they are optional - i.e., a sysext will not contain /etc/. So mixing a
confext and a sysext fails, as we'll try to create an overlay with /etc/
from the base, the confext and the sysext, but the latter doesn't have
the directory.

After the source images are mounted, check that each hierarchy exists in
each source image before creating the overlay, and drop them if they
don't.

Follow-up for 55ea4ef096543
src/core/namespace.c
test/units/testsuite-50.sh