Skip to content

Commit

Permalink
app-emulation/libvirt: 6.7.0 and 9999: Added "|| die" to all rm/touch…
Browse files Browse the repository at this point in the history
… calls.

Signed-off-by: Jonathan Davies <[email protected]>
Signed-off-by: Matthias Maier <[email protected]>
  • Loading branch information
jpds authored and tamiko committed Oct 1, 2020
1 parent dd99766 commit b357d99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions app-emulation/libvirt/libvirt-6.7.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pkg_setup() {
}

src_prepare() {
touch "${S}/.mailmap"
touch "${S}/.mailmap" || die

default

Expand Down Expand Up @@ -299,9 +299,9 @@ src_install() {

# Remove bogus, empty directories. They are either not used, or
# libvirtd is able to create them on demand
rm -rf "${D}"/etc/sysconfig
rm -rf "${D}"/var
rm -rf "${D}"/run
rm -rf "${D}"/etc/sysconfig || die
rm -rf "${D}"/var || die
rm -rf "${D}"/run || die

newbashcomp "${S}/tools/bash-completion/vsh" virsh
bashcomp_alias virsh virt-admin
Expand All @@ -327,13 +327,13 @@ src_install() {
pkg_preinst() {
# we only ever want to generate this once
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die
fi
}

pkg_postinst() {
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
fi

use libvirtd || return 0
Expand Down
12 changes: 6 additions & 6 deletions app-emulation/libvirt/libvirt-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pkg_setup() {
}

src_prepare() {
touch "${S}/.mailmap"
touch "${S}/.mailmap" || die

default

Expand Down Expand Up @@ -296,9 +296,9 @@ src_install() {

# Remove bogus, empty directories. They are either not used, or
# libvirtd is able to create them on demand
rm -rf "${D}"/etc/sysconfig
rm -rf "${D}"/var
rm -rf "${D}"/run
rm -rf "${D}"/etc/sysconfig || die
rm -rf "${D}"/var || die
rm -rf "${D}"/run || die

newbashcomp "${S}/tools/bash-completion/vsh" virsh
bashcomp_alias virsh virt-admin
Expand All @@ -324,13 +324,13 @@ src_install() {
pkg_preinst() {
# we only ever want to generate this once
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die
fi
}

pkg_postinst() {
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
fi

use libvirtd || return 0
Expand Down

0 comments on commit b357d99

Please sign in to comment.