Subject: [alpine-aports] [apline-aports] [PATCH] main/procps: manage busybox symlink conflict

From: Matthew Hoare <[email-masked]>
Date: Sun, 31 Dec 2017 23:52:19 +0000

>From 5b905cf91c5b08a98d1d65fbcf9ed209025bdc28 Mon Sep 17 00:00:00 2001
From: Matthew T Hoare <[email-masked]>
Date: Sun, 31 Dec 2017 23:41:35 +0000
Subject: [PATCH 1/1] Remove busybox symlinks when procps binaries are
 installed.

---
 main/procps/APKBUILD             | 1 +
 main/procps/procps.post-install  | 7 +++++++
 main/procps/procps.post-upgrade  | 1 +
 main/procps/procps.pre-deinstall | 7 +++++++
 4 files changed, 16 insertions(+)
 create mode 100644 main/procps/procps.post-install
 create mode 100644 main/procps/procps.post-upgrade
 create mode 100644 main/procps/procps.pre-deinstall

diff --git a/main/procps/APKBUILD b/main/procps/APKBUILD
index 3495ee6..af46308 100644
--- a/main/procps/APKBUILD
+++ b/main/procps/APKBUILD
@@ -6,6 +6,7 @@ pkgdesc="Utilities for monitoring your system and processes
on your system"
 url="https://gitlab.com/procps-ng/procps"
 arch="all"
 license="GPL LGPL"
+install="${pkgname}.post-install ${pkgname}.post-upgrade
${pkgname}.pre-deinstall"
 makedepends="ncurses-dev gettext-dev autoconf automake libtool"
 checkdepends="dejagnu"
 subpackages="$pkgname-dev $pkgname-doc libproc"
diff --git a/main/procps/procps.post-install
b/main/procps/procps.post-install
new file mode 100644
index 0000000..823a7c2
--- /dev/null
+++ b/main/procps/procps.post-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in pwdx pmap free top pgrep pkill uptime
+  do rm "/usr/bin/${i}"
+done
+
+exit 0
diff --git a/main/procps/procps.post-upgrade
b/main/procps/procps.post-upgrade
new file mode 100644
index 0000000..02ff57d
--- /dev/null
+++ b/main/procps/procps.post-upgrade
@@ -0,0 +1 @@
+procps.post-install
diff --git a/main/procps/procps.pre-deinstall
b/main/procps/procps.pre-deinstall
new file mode 100644
index 0000000..f43b6ee
--- /dev/null
+++ b/main/procps/procps.pre-deinstall
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in pwdx pmap free top pgrep pkill uptime
+  do ln -sf /bin/busybox "/usr/bin/${i}"
+done
+
+exit 0
-- 
2.15.0