From patchwork Thu Nov 19 10:36:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 546383 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id BB05D141491 for ; Thu, 19 Nov 2015 21:36:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 53B348940B; Thu, 19 Nov 2015 10:36:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id byAvs7bD4piS; Thu, 19 Nov 2015 10:36:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3526394BA8; Thu, 19 Nov 2015 10:36:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 447041C15DD for ; Thu, 19 Nov 2015 10:36:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 565708BF5A for ; Thu, 19 Nov 2015 10:36:25 +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 t7uE1bip9Z3R for ; Thu, 19 Nov 2015 10:36:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id EF9A986BDF for ; Thu, 19 Nov 2015 10:36:24 +0000 (UTC) Received: from localhost.localdomain (unknown [212.234.226.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id F162742F5C; Thu, 19 Nov 2015 11:36:21 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Thu, 19 Nov 2015 11:36:06 +0100 Message-Id: <1447929366-8972-6-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447929366-8972-1-git-send-email-jezz@sysmic.org> References: <1447929366-8972-1-git-send-email-jezz@sysmic.org> MIME-Version: 1.0 Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH 5/5] pkg-generic: tag sources if git is used 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In order to simplify patch updating, tag original version of sources. We may also provide a feature to automaticaly update patches in future. Signed-off-by: Jérôme Pouiller --- package/pkg-generic.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 30155a6..6d7677b 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -152,6 +152,12 @@ $(BUILD_DIR)/%/.stamp_patched: @$(call step_start,patch) @$(call MESSAGE,"Patching") $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) + $(Q)( \ + if test -d $(@D)/.git; then \ + GIT_DIR=$(@D)/.git $(GIT) tag upstream; \ + GIT_DIR=$(@D)/.git $(GIT) tag $(NAMEVER); \ + fi; \ + ) $(foreach p,$($(PKG)_PATCH),$(APPLY_PATCHES) $(@D) $(DL_DIR) $(notdir $(p))$(sep)) $(Q)( \ for D in $(PATCH_BASE_DIRS); do \