From patchwork Fri Dec 7 02:37:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danomi Manchego X-Patchwork-Id: 204380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 0AC692C00C4 for ; Fri, 7 Dec 2012 13:45:30 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1957E101CE8; Fri, 7 Dec 2012 02:45:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ji0IbyHM4Anj; Fri, 7 Dec 2012 02:45:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E6E64101C7D; Fri, 7 Dec 2012 02:45:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 4F7218F753 for ; Fri, 7 Dec 2012 02:45:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3BAA1101C7D for ; Fri, 7 Dec 2012 02:45:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PW52QRYUgSQH for ; Fri, 7 Dec 2012 02:45:16 +0000 (UTC) X-Greylist: delayed 00:08:12 by SQLgrey-1.7.6 Received: from qmta03.westchester.pa.mail.comcast.net (qmta03.westchester.pa.mail.comcast.net [76.96.62.32]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7A2B7101C74 for ; Fri, 7 Dec 2012 02:45:16 +0000 (UTC) Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by qmta03.westchester.pa.mail.comcast.net with comcast id YQ1D1k01L0mv7h053SdB9i; Fri, 07 Dec 2012 02:37:11 +0000 Received: from localhost.localdomain ([68.37.48.40]) by omta11.westchester.pa.mail.comcast.net with comcast id YSdB1k00J0s1VyU3XSdB9y; Fri, 07 Dec 2012 02:37:11 +0000 From: Danomi Manchego To: buildroot@uclibc.org Date: Thu, 6 Dec 2012 21:37:07 -0500 Message-Id: <1354847827-4902-1-git-send-email-danomimanchego123@gmail.com> X-Mailer: git-send-email 1.7.9.5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1354847831; bh=jRy0QRqBKUegKDY3Jc3cE36IGnFgnvzkfyMAI125ln8=; h=Received:Received:From:To:Subject:Date:Message-Id; b=s+sf6Kb/QNA5BUi1hryYIxdaZS/bj4uVU63eL8zIdD22xC7zDqTU+p8WkinAhTNkj HiI96uwK0hPID/QIOzsX5/i7E2SaPUJoaoUdFxU/pLI+5kIKCuJWFkyD7w/NBRhKDJ UBFPi84VDjqO8353kXwBB7omRJDyfLo2manb5ia/I8xXpzLHOh9VQKdeUiKsrM7nE9 Tt7sWTfGAizdbANDGa5i0ivjwVnzx8bf/Z2n4zTVRrG8dyVWi72h8DDHm/8wXlHRF2 HafAE1wo1z3rpKTS7nyUWW0rlQbVBXjAzTbaVzdSCJWjbfXKJApPf5TZo50dyV5V06 dzUysysg9StGA== Subject: [Buildroot] [PATCH] pkg-download.mk: fix multiple matches in shallow clone test 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 Move the git reference directly to git-ls-remote rather than piping the output to grep, to help avoid reporting partial matches rather than the actual requested reference. Also, add quotes to protest "test" from failing when multiple strings are reported. Signed-off-by: Danomi Manchego Acked-by: Arnout Vandecappelle (Essensium/Mind) --- 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 ea01b05..1705fcd 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -82,7 +82,7 @@ domainseparator=$(if $(1),$(1),/) define DOWNLOAD_GIT test -e $(DL_DIR)/$($(PKG)_SOURCE) || \ (pushd $(DL_DIR) > /dev/null && \ - ((test `git ls-remote $($(PKG)_SITE) | cut -f 2- | grep $($(PKG)_DL_VERSION)` && \ + ((test "`git ls-remote $($(PKG)_SITE) $($(PKG)_DL_VERSION)`" && \ echo "Doing shallow clone" && \ $(GIT) clone --depth 1 -b $($(PKG)_DL_VERSION) --bare $($(PKG)_SITE) $($(PKG)_BASE_NAME)) || \ (echo "Doing full clone" && \