diff options
author | Mike Gilbert <floppym@gentoo.org> | 2023-10-16 15:46:41 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2023-10-16 15:53:13 -0400 |
commit | d33ffb6d7f392fffac72589ae99580f97a847eff (patch) | |
tree | 5e8d60a01b5c6c295b3f45fb6ce9fcc817d2c9cc /sys-fs/lvm2 | |
parent | dev-libs/libcpuid: drop 0.6.2, 0.6.3 (diff) | |
download | gentoo-d33ffb6d7f392fffac72589ae99580f97a847eff.tar.gz gentoo-d33ffb6d7f392fffac72589ae99580f97a847eff.tar.bz2 gentoo-d33ffb6d7f392fffac72589ae99580f97a847eff.zip |
sys-fs/lvm2: rework install logic
This makes the logic more readable.
It also probably resolves a race condition by not passing both "install"
and "install_device-mapper" as targets.
Drop the "install_systemd_generators" target: this has been a noop for
several releases.
Closes: https://bugs.gentoo.org/913231
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r-- | sys-fs/lvm2/lvm2-2.03.22-r1.ebuild | 22 | ||||
-rw-r--r-- | sys-fs/lvm2/lvm2-2.03.22-r2.ebuild | 22 |
2 files changed, 22 insertions, 22 deletions
diff --git a/sys-fs/lvm2/lvm2-2.03.22-r1.ebuild b/sys-fs/lvm2/lvm2-2.03.22-r1.ebuild index 263e01250962..6d98d1035b43 100644 --- a/sys-fs/lvm2/lvm2-2.03.22-r1.ebuild +++ b/sys-fs/lvm2/lvm2-2.03.22-r1.ebuild @@ -194,17 +194,17 @@ src_test() { } src_install() { - local INSTALL_TARGETS=( - # full LVM2 - $(usev lvm "install install_tmpfiles_configuration") - # install systemd related files only when requested, bug #522430 - $(usev $(usex lvm systemd lvm) "SYSTEMD_GENERATOR_DIR=$(systemd_get_systemgeneratordir) \ - install_systemd_units install_systemd_generators") - - # install dm unconditionally - install_device-mapper - ) - emake V=1 DESTDIR="${D}" "${INSTALL_TARGETS[@]}" + local targets=() + if use lvm; then + targets+=( install install_tmpfiles_configuration ) + if use systemd; then + # install systemd related files only when requested, bug #522430 + targets+=( install_systemd_units ) + fi + else + targets+=( install_device-mapper ) + fi + emake V=1 DESTDIR="${D}" "${targets[@]}" newinitd "${FILESDIR}"/device-mapper.rc-r3 device-mapper newconfd "${FILESDIR}"/device-mapper.conf-r4 device-mapper diff --git a/sys-fs/lvm2/lvm2-2.03.22-r2.ebuild b/sys-fs/lvm2/lvm2-2.03.22-r2.ebuild index cac7188abf10..ba546b95e777 100644 --- a/sys-fs/lvm2/lvm2-2.03.22-r2.ebuild +++ b/sys-fs/lvm2/lvm2-2.03.22-r2.ebuild @@ -194,17 +194,17 @@ src_test() { } src_install() { - local INSTALL_TARGETS=( - # full LVM2 - $(usev lvm "install install_tmpfiles_configuration") - # install systemd related files only when requested, bug #522430 - $(usev $(usex lvm systemd lvm) "SYSTEMD_GENERATOR_DIR=$(systemd_get_systemgeneratordir) \ - install_systemd_units install_systemd_generators") - - # install dm unconditionally - install_device-mapper - ) - emake V=1 DESTDIR="${D}" "${INSTALL_TARGETS[@]}" + local targets=() + if use lvm; then + targets+=( install install_tmpfiles_configuration ) + if use systemd; then + # install systemd related files only when requested, bug #522430 + targets+=( install_systemd_units ) + fi + else + targets+=( install_device-mapper ) + fi + emake V=1 DESTDIR="${D}" "${targets[@]}" newinitd "${FILESDIR}"/device-mapper.rc-r3 device-mapper newconfd "${FILESDIR}"/device-mapper.conf-r4 device-mapper |