* [PATCH] opkg-utils: clear update-alternatives database on uninstall
@ 2016-11-10 10:46 André Draszik
0 siblings, 0 replies; only message in thread
From: André Draszik @ 2016-11-10 10:46 UTC (permalink / raw)
To: openembedded-core
From: André Draszik <adraszik@tycoint.com>
When uninstalling update-alternatives, it doesn't seem to
make much sense to keep the update-alternatives database
around.
In particular when removing packaging data, e.g. due to
read-only rootfs, update-alternatives is removed from
the target file system. Leaving its database around
serves no purpose in that case as there is no way to
use it afterwards anyway.
This frees close to 700KB of (uncompressed) space in
a busybox based environment.
Signed-off-by: André Draszik <adraszik@tycoint.com>
---
meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index a7aec45..19a852e 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -43,4 +43,9 @@ RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cw
RREPLACES_update-alternatives-opkg = "update-alternatives-cworth"
RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth"
+pkg_postrm_update-alternatives-opkg() {
+ rm -rf $OPKG_OFFLINE_ROOT${nonarch_libdir}/opkg/alternatives
+ rmdir --ignore-fail-on-non-empty $OPKG_OFFLINE_ROOT${nonarch_libdir}/opkg
+}
+
BBCLASSEXTEND = "native nativesdk"
--
2.10.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-10 10:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-10 10:46 [PATCH] opkg-utils: clear update-alternatives database on uninstall André Draszik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.