summaryrefslogtreecommitdiffstats
path: root/debian/linux-perf.postrm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:49:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:49:59 +0000
commit01997497f915e8f79871f3f2acb55ac465051d24 (patch)
tree1ce1afd7246e1014199e15cbf854bf7924458e5d /debian/linux-perf.postrm
parentAdding upstream version 6.1.76. (diff)
downloadlinux-debian.tar.xz
linux-debian.zip
Adding debian version 6.1.76-1.debian/6.1.76-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/linux-perf.postrm')
-rw-r--r--debian/linux-perf.postrm22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/linux-perf.postrm b/debian/linux-perf.postrm
new file mode 100644
index 000000000..84a6e3df5
--- /dev/null
+++ b/debian/linux-perf.postrm
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+old_version_suffix="$(echo "$2" | sed -rn 's/^([0-9]+\.[0-9]+).*/\1/p')"
+if [ "$old_version_suffix" ]; then
+ dpkg-maintscript-helper symlink_to_dir \
+ /usr/share/doc/linux-perf "linux-perf-${old_version_suffix}" 5.16\~rc8-1\~exp1 linux-perf -- "$@"
+fi
+
+if [ "$1" = remove ]
+then
+ for wrapper in /usr/bin/perf \
+ /usr/share/bash-completion/completions/perf \
+ /usr/share/man/man1/perf.1.gz; do
+ diversion="${wrapper%/perf*}/perf.wrapper${wrapper#*/perf}"
+ dpkg-divert --package linux-perf --divert "$diversion" --rename \
+ --remove "$wrapper"
+ done
+fi
+
+#DEBHELPER#