From patchwork Fri Nov 28 15:25:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Kehn X-Patchwork-Id: 415898 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id F3117140280 for ; Sat, 29 Nov 2014 02:25:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2A9CA92CC2; Fri, 28 Nov 2014 15:25:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2EgY8cdrrcyY; Fri, 28 Nov 2014 15:25:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id DAE8E92CA2; Fri, 28 Nov 2014 15:25:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B2E451C2001 for ; Fri, 28 Nov 2014 15:25:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9982D33777 for ; Fri, 28 Nov 2014 15:25:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GpIYlPbWqHdN for ; Fri, 28 Nov 2014 15:25:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm30-vm1.bullet.mail.ne1.yahoo.com (nm30-vm1.bullet.mail.ne1.yahoo.com [98.138.90.46]) by silver.osuosl.org (Postfix) with ESMTPS id 9BDD232D88 for ; Fri, 28 Nov 2014 15:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1417188324; bh=9C+E79uqLyqgAlXl/nUJ7FBIsxV8iUWpE/JuqNZV0hw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject; b=B8Rm+k5fjFOcl3BWUZZ6F/ybc8h9IjXTLqwKEnpQUv79QuZUyjdIb/fDyllRcQu964k7CcpHJFSIzZ6793FMqtGmx6QXMJFWFSp1LsnOShjPI3AouNU+nYTso9Fkp879y2XmIhn7hADmlgyFOf7G+cqZ9gz4txNi0w2MZS6kP8NBBeVL+wYsGJiYtG0SLbDbIlxmiJDpHn/gyrVKOtsXPRFrTBKumAm8H1UV2WBehfw83bpcg6FyzDKMxo+Q/03YXInK93ZibyHWN6VlCR88RZqGthjHagHWrVeXQ7bPj1JavKWvS1O0QxSzx19OxjNJU6FLWeJsyzPC7APm1RCjbA== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=HDZ289f+ConN0bmJ8DTfkLXmkc0/5FVVuwvtcXXSJ72ffdUjXsW2K6fZNwuvTwTkoFs8FND0a5VyH6x/1x33StjtTYvwfY/owb6+H00tLQ7y8KlmeBEV8E6ZyW7K4o/Z9kHbOLL+jhylcLSOYegDdaAHGS+Jwe5cIobmDdMnh8IQWzDGzhvn1Ry2MSE61440s7IsMen6oJuT2Mi1pQvJQHH7hc9VctwLAmdCSkDMOR31OktdiTLZOHSEAl7qGr5EndoSTFcWhFZASanV0ch9e8gS8gr2VnfqW4vfL8U3w6ldmnKgo7VaJdMXcYz0tp9Caj/KZzwl5XGhhG33fTaB9Q==; Received: from [98.138.101.132] by nm30.bullet.mail.ne1.yahoo.com with NNFMP; 28 Nov 2014 15:25:24 -0000 Received: from [98.138.226.57] by tm20.bullet.mail.ne1.yahoo.com with NNFMP; 28 Nov 2014 15:25:24 -0000 Received: from [127.0.0.1] by smtp208.mail.ne1.yahoo.com with NNFMP; 28 Nov 2014 15:25:24 -0000 X-Yahoo-Newman-Id: 722506.40324.bm@smtp208.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: kzgZ_WAVM1lvvmYFm4rLhgfUUxjzZ_EmrjKS4Oew6BJql_V ytwdb0vJevHOsoa50jVjXoXGF7x4PohHHkvO9MVLQnGsMhqDh.lh.KPcTHUg VOkPiVuV80h7P19b6cvN_3.HxSH6MfPWv_CFRtj7LFeDH4VUadynG9grpSAg vDEdQSSpgtcvWfBeZcLxjuBBhc6q5xadKi1NM9vePyD8Cew9.dPsZTagsdFp t8_3fH5YbwuJqbw90pAEZ3sU8Cx5vlD_qZo9mwU64LVRGxWhbXpnEUgMOZ.H sQg_qnHm1v_e5CqOGXB7u4VG3dtN9E98wTtdPilA_iSLee78trHKAY0GEp2K y8OQDsGC4SOrUcqIFSBxBo23ZFw3MqAwDh6Ytc0S4mlGO1V6LtYXVLTm2X2T 9v6Jvo1J2Zp_s7X_AU25E7DrYd4vD2hViUu_3IhAXMXaabr_sR5d75hOKRQm zLKBtuhWqpTkPmSED1VPWQ36gjng6eq6O1zGENL23RpZ6bbE3zcQ1HJNT52x BEqEYzOLb4Qsfkp1mZNdDSUDYIRHnumRUmmav2Cxm2DwpFZJR_hxrYx5yjKd y19L9cOA5lSu_8e8R45ga8i6nsUjIVvI- X-Yahoo-SMTP: tVp.douswBADms9I1_pvnFcs0w-- From: Doug Kehn To: buildroot@buildroot.org Date: Fri, 28 Nov 2014 09:25:04 -0600 Message-Id: <1417188306-9035-2-git-send-email-rdkehn@yahoo.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417188306-9035-1-git-send-email-rdkehn@yahoo.com> References: <1417188306-9035-1-git-send-email-rdkehn@yahoo.com> Subject: [Buildroot] [PATCH v3 1/3] pkg-generic.mk: reinstall targets X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add reinstall targets for host, target, staging, and images variants. clean-for-reinstall targets added to remove package .stamp_target_install file to allow package install. Additionally, when OVERRIDE_SRCDIR is provided, .stamp_rsynced is removed to ensure pakcage is up to date before reinstalling. Signed-off-by: Doug Kehn --- package/pkg-generic.mk | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 9643a30..0fe7059 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -480,34 +480,51 @@ $(1): $(1)-install ifeq ($$($(2)_TYPE),host) $(1)-install: $(1)-install-host +$(1)-reinstall: $(1)-reinstall-host else $(1)-install: $(1)-install-staging $(1)-install-target $(1)-install-images +$(1)-reinstall: $(1)-reinstall-staging $(1)-reinstall-target $(1)-reinstall-images endif ifeq ($$($(2)_INSTALL_TARGET),YES) $(1)-install-target: $$($(2)_TARGET_INSTALL_TARGET) +$(1)-reinstall-target: $(1)-clean-for-reinstall-target $$($(2)_TARGET_INSTALL_TARGET) +$(1)-clean-for-reinstall-target:$(1)-clean-for-reinstall + rm -f $$($(2)_TARGET_INSTALL_TARGET) $$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_BUILD) else $(1)-install-target: +$(1)-reinstall-target: endif ifeq ($$($(2)_INSTALL_STAGING),YES) $(1)-install-staging: $$($(2)_TARGET_INSTALL_STAGING) +$(1)-reinstall-staging: $(1)-clean-for-reinstall-staging $$($(2)_TARGET_INSTALL_STAGING) +$(1)-clean-for-reinstall-staging: $(1)-clean-for-reinstall + rm -f $$($(2)_TARGET_INSTALL_STAGING) $$($(2)_TARGET_INSTALL_STAGING): $$($(2)_TARGET_BUILD) # Some packages use install-staging stuff for install-target $$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_INSTALL_STAGING) else $(1)-install-staging: +$(1)-reinstall-staging: endif ifeq ($$($(2)_INSTALL_IMAGES),YES) $(1)-install-images: $$($(2)_TARGET_INSTALL_IMAGES) +$(1)-reinstall-images: $(1)-clean-for-reinstall-images $$($(2)_TARGET_INSTALL_IMAGES) +$(1)-clean-for-reinstall-images:$(1)-clean-for-reinstall + rm -f $$($(2)_TARGET_INSTALL_IMAGES) $$($(2)_TARGET_INSTALL_IMAGES): $$($(2)_TARGET_BUILD) else $(1)-install-images: +$(1)-reinstall-images: endif $(1)-install-host: $$($(2)_TARGET_INSTALL_HOST) +$(1)-reinstall-host: $(1)-clean-for-reinstall-host $$($(2)_TARGET_INSTALL_HOST) +$(1)-clean-for-reinstall-host: $(1)-clean-for-reinstall + rm -f $$($(2)_TARGET_INSTALL_HOST) $$($(2)_TARGET_INSTALL_HOST): $$($(2)_TARGET_BUILD) $(1)-build: $$($(2)_TARGET_BUILD) @@ -545,6 +562,8 @@ $$($(2)_TARGET_EXTRACT): $$($(2)_TARGET_SOURCE) $(1)-depends: $$($(2)_FINAL_DEPENDENCIES) $(1)-source: $$($(2)_TARGET_SOURCE) + +$(1)-clean-for-reinstall: else # In the package override case, the sequence of steps # source, by rsyncing @@ -563,6 +582,9 @@ $(1)-extract: $(1)-rsync $(1)-rsync: $$($(2)_TARGET_RSYNC) $(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) + +$(1)-clean-for-reinstall: + rm -f $$($(2)_TARGET_RSYNC) endif $(1)-show-depends: