From patchwork Fri Mar 29 14:07:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Boettcher X-Patchwork-Id: 232419 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 B9F1C2C00C8 for ; Sat, 30 Mar 2013 01:08:35 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1BE2D8C8CE; Fri, 29 Mar 2013 14:08:29 +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 x-inGqaUbGSo; Fri, 29 Mar 2013 14:08:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id AB1F68C8F2; Fri, 29 Mar 2013 14:08:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2A5418F753 for ; Fri, 29 Mar 2013 14:08:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6A0D38C77E for ; Fri, 29 Mar 2013 14:08:09 +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 xwYeZTEQ-2pM for ; Fri, 29 Mar 2013 14:08:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by whitealder.osuosl.org (Postfix) with ESMTPS id BAB4B8BEE2 for ; Fri, 29 Mar 2013 14:08:08 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id n12so457913wgh.7 for ; Fri, 29 Mar 2013 07:08:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=RRZipW8xIm8MfEozguJoEeY8sBLX1l421/cGqUljnJs=; b=ezH9+eOX49uQUyQ9KgPqAO5YjW60vJ89fTstzQG39SmTd2wXBfsb1yEp9kIrExT9Wn CQ5BXNIYPqgZ1t9cOLiOUjOpoih6g7Um/kZ4tjlE3HpjwSc2BLk5b58nz2cZwD5PIHgm MxavVWjeKIuU4CMnSlQjxGagRJhjZo1lYmFkgcBlEAXL3hWwyArzTVkKB1Z6mNlhXnCo 4lX1SJxVkmuBJEdafAfjibFb4EivJbKUyN0LLtEmmC+Db8+wHs30DZuy551urjSS/41q ZmQUih1ql8f8LCXoQExZH82EBnmfwDkFlTlXgWwW1sDBAO2IOi3MTFWUudwBydDktdvt vvPw== X-Received: by 10.180.10.105 with SMTP id h9mr3639202wib.34.1364566087116; Fri, 29 Mar 2013 07:08:07 -0700 (PDT) Received: from lappi3.home (AMontsouris-755-1-22-161.w90-46.abo.wanadoo.fr. [90.46.29.161]) by mx.google.com with ESMTPS id dp5sm19943446wib.1.2013.03.29.07.08.05 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Mar 2013 07:08:06 -0700 (PDT) From: Patrick Boettcher To: buildroot@busybox.net Date: Fri, 29 Mar 2013 15:07:58 +0100 Message-Id: <1364566078-29535-2-git-send-email-Patrick.Boettcher@parrot.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364566078-29535-1-git-send-email-Patrick.Boettcher@parrot.com> References: <1364566078-29535-1-git-send-email-Patrick.Boettcher@parrot.com> X-Gm-Message-State: ALoCoQlCWLLBZMqUN6THvDbqdJalO/no7xelsvIUd0cxNPb1koOZKgJc7bSFBm9uT+pq7DFhtPli Cc: Patrick Boettcher Subject: [Buildroot] [PATCH] pkg-download: take some more care of VERSION when METHOD is git X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net If a package's SITE_METHOD is set to git, but the VERSION is not set it fails to create a tar-ball, this patch is fixes this by always using HEAD as git-archive reference. HEAD will work in both cases: 1) if VERSION is set the clone's HEAD is VERSION, 2) if VERSION is not set the clone's HEAD is the default branch. Signed-off-by: Patrick Boettcher --- package/pkg-download.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 1705fcd..d21605a 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -88,7 +88,7 @@ define DOWNLOAD_GIT (echo "Doing full clone" && \ $(GIT) clone --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME))) && \ pushd $($(PKG)_BASE_NAME) > /dev/null && \ - $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \ + $(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ HEAD | \ gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \ popd > /dev/null && \ rm -rf $($(PKG)_DL_DIR) && \