Return-Path: Received: from mail.hanoverdisplays.com (mail.hanoverdisplays.com [62.7.92.68]) by mail.openembedded.org (Postfix) with ESMTP id CA993782E6 for ; Tue, 13 Jun 2017 09:47:59 +0000 (UTC) Received: from localhost (192.168.0.21) by mail.hanoverdisplays.com (192.168.0.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 13 Jun 2017 10:47:58 +0100 From: Alejandro Mery To: Date: Tue, 13 Jun 2017 10:47:55 +0100 Message-ID: <20170613094756.29845-1-amery@hanoverdisplays.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 X-Originating-IP: [192.168.0.21] X-GFI-SMTP-Submission: 1 X-GFI-SMTP-HelloDomain: localhost X-GFI-SMTP-RemoteIP: 192.168.0.21 Subject: [meta-oe][PATCH 1/2] gitver: extend class to use EXTERNALSRC if set X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2017 09:48:00 -0000 Content-Type: text/plain Signed-off-by: Alejandro Mery --- meta-oe/classes/gitver.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta-oe/classes/gitver.bbclass b/meta-oe/classes/gitver.bbclass index a16429aa8..73521d538 100644 --- a/meta-oe/classes/gitver.bbclass +++ b/meta-oe/classes/gitver.bbclass @@ -24,7 +24,8 @@ def get_git_pv(path, d, tagadjust=None): import os import bb.process - gitdir = os.path.abspath(os.path.join(d.getVar("S"), ".git")) + srcdir = d.getVar("EXTERNALSRC") or d.getVar("S") + gitdir = os.path.abspath(os.path.join(srcdir, ".git")) try: ver = gitrev_run("git describe --tags", gitdir) except Exception as exc: @@ -71,5 +72,6 @@ def mark_recipe_dependencies(path, d): mark_dependency(d, tagdir) python () { - mark_recipe_dependencies(d.getVar("S"), d) + srcdir = d.getVar("EXTERNALSRC") or d.getVar("S") + mark_recipe_dependencies(srcdir, d) } -- 2.13.0