Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Forsman" <bjorn.forsman@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Fix uninstallation of non-staged packages
Date: Sun, 20 Feb 2011 19:27:45 +0100	[thread overview]
Message-ID: <1298226465-28124-1-git-send-email-bjorn.forsman@gmail.com> (raw)

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@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

             reply	other threads:[~2011-02-20 18:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20 18:27 Bjørn Forsman [this message]
2011-02-20 18:59 ` [Buildroot] [PATCH] Fix uninstallation of non-staged packages Thomas Petazzoni
2011-02-20 19:59   ` Bjørn Forsman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1298226465-28124-1-git-send-email-bjorn.forsman@gmail.com \
    --to=bjorn.forsman@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox