shared/install: rework alias check and add test
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 19 Dec 2019 15:53:12 +0000 (16:53 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 10 Jan 2020 13:27:04 +0000 (14:27 +0100)
commit3f57bc2267e09c09c9f11cb0d104ee87267e452b
tree72339b841e716f1ff1690901f17c44a639d21dc7
parent9a4f9e69e10886a45549264b83b1c02c345c572f
shared/install: rework alias check and add test

This mostly reuses existing checkers used by pid1, so handling of aliases
should be consistent. Hopefully, with the test it'll be clearer what it
happening.

Support for .wants/.requires "aliases" is restored. Those are still used in the
wild quite a bit, so we need to support them.

See https://github.com/systemd/systemd/pull/13119 for a discussion of aliases
with an instance that point to a different template: this is allowed.
src/shared/install.c
src/shared/install.h
src/test/test-install-root.c