Code review comment for ~ahasenack/ubuntu/+source/qemu:noble-qemu-gluster-universe

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is what the rendered maintainer scripts looks like:

$ cat qemu-block-extra.prerm
#!/bin/sh
set -e
case $1 in (upgrade|deconfigure) [ -d /run/qemu ] || exit 0; ! findmnt --noheadings --target /run/qemu/ | grep -q noexec || exit 0; mkdir -p /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3; for m in /usr/lib/x86_64-linux-gnu/qemu/block-*.so; do if echo "block-gluster.so" | grep -qF `basename "$m"`; then continue; else cp -p $m /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/; fi; done;; esac

$ cat qemu-block-extra.postrm
#!/bin/sh
set -e
case $1 in (remove) for m in /usr/lib/x86_64-linux-gnu/qemu/block-*.so; do if echo "block-gluster.so" | grep -qF `basename "$m"`; then continue; else rm -f /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/`basename $m`; fi; done;; esac
case $1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac

$ cat qemu-block-supplemental.prerm
#!/bin/sh
set -e
case $1 in (upgrade|deconfigure) [ -d /run/qemu ] || exit 0; ! findmnt --noheadings --target /run/qemu/ | grep -q noexec || exit 0; mkdir -p /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3; for m in block-gluster.so; do cp -p /usr/lib/x86_64-linux-gnu/qemu/$m /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/; done;; esac

$ cat qemu-block-supplemental.postrm
#!/bin/sh
set -e
case $1 in (remove) for m in block-gluster.so; do rm -f /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/$m; done;; esac

« Back to merge proposal