libvirt/scripts
Andrea Bolognani b1aeca5db0 systemd: Support merging multiple units
In order to further deduplicate the contents of the various unit
files, we need to be able to merge multiple additional units
into the initial one.

Luckily the merge logic is in no way constrained to working with
just two units, so achieving this is pretty much just a matter
of lifting the existing limitation on the number of arguments
that the script accepts.

As a special case, it's now also possible to call the script
with just the base unit as argument. No merging will be performed
in that case, obviously, but we'll still go through the basic
validation and cleanup steps.

This also fixes a bug in the check for the number of arguments:
sys.argv also contains the name of the script, so we should have
checked that its size was at least 3. The check is now written in
a way that's less prone to misunderstandings.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2023-10-25 11:42:19 +02:00
..
apibuild.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
augeas-gentest.py
check-aclperms.py
check-aclrules.py
check-driverimpls.py
check-drivername.py
check-file-access.py
check-html-references.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
check-pot.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
check-remote-protocol.py
check-symfile.py
check-symsorting.py
cocci-macro-file.h lib: Use G_NO_INLINE instead of G_GNUC_NO_INLINE 2022-07-18 17:23:15 +02:00
dtrace2systemtap.py
esx_vi_generator.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
genaclperms.py docs: ACL: Mention the ACL object name along with the corresponding libvirt object name 2023-02-20 18:26:47 +01:00
genpolkit.py
gensystemtap.py
group-qemu-caps.py scripts: group-qemu-caps: Add capability name as comment to capability string 2021-08-18 09:37:09 +02:00
header-ifdef.py
hvsupport.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
hyperv_wmi_generator.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
merge-systemd-units.py systemd: Support merging multiple units 2023-10-25 11:42:19 +02:00
meson-dist.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
meson-gen-authors.py
meson-gen-def.py
meson-gen-sym.py
meson-install-dirs.py
meson-install-symlink.py
meson-install-web.py scripts: Add $DESTDIR support to meson-install-web.py 2022-08-11 14:01:55 +02:00
meson-python.sh
meson-timestamp.py scripts: Fix the flake8 syntax-check failures 2023-06-29 11:51:27 +02:00
meson.build systemd: Introduce common templates 2023-10-02 10:41:07 +02:00
mock-noinline.py lib: Use G_NO_INLINE instead of G_GNUC_NO_INLINE 2022-07-18 17:23:15 +02:00
prohibit-duplicate-header.py