[Buildroot] [PATCH] Fix uninstallation of non-staged packages

Bjørn Forsman bjorn.forsman at gmail.com
Sun Feb 20 18:27:45 UTC 2011


Packages without $(PKG)_INSTALL_STAGING=YES currently fail to uninstall
themselves with 'make pkg-uninstall'. For a real life example of the
error, try uninstalling 'at' or 'dropbear'.

This patch fixes the issue by only uninstalling packages from staging if
$(PKG)_INSTALL_STAGING==YES.

Signed-off-by: Bjørn Forsman <bjorn.forsman at gmail.com>
---
 package/Makefile.package.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 92ce4e2..1482284 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -321,8 +321,10 @@ $(BUILD_DIR)/%/.stamp_cleaned:
 # Uninstall package from target and staging
 $(BUILD_DIR)/%/.stamp_uninstalled:
 	@$(call MESSAGE,"Uninstalling")
+ifeq ($$($(2)_INSTALL_STAGING),YES)
 	$($(PKG)_UNINSTALL_STAGING_CMDS)
 	rm -f $($(PKG)_TARGET_INSTALL_STAGING)
+endif
 	$($(PKG)_UNINSTALL_TARGET_CMDS)
 	rm -f $($(PKG)_TARGET_INSTALL_TARGET) $($(PKG)_HOOK_POST_INSTALL)
 
-- 
1.7.1




More information about the buildroot mailing list