From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.17700.1796149093280912799 for ; Tue, 01 Dec 2026 10:18:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=tKQvtZnx; spf=pass (domain: gmail.com, ip: 209.85.215.182, mailfrom: bbnpreetsingh@gmail.com) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-cde1479f76fso6461203a12.0 for ; Tue, 01 Dec 2026 10:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796149092; x=1796753892; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=s4ZZBF8Ylet5jvO6p7s2FQJ47PYPbn1FEB3ydmV2ATA=; b=tKQvtZnxa33zIxu+qGnymE97n/Avxn7IXruRakkOmOqdUKNZPlWaxUFCrW8HxBqo9u O7noBf/73OBPkErIZj0OerhDiXxZeia2OqoEja1NYCTEEPxmZXT8mz4O9DyuXs4I2uXk 1zHvCQOLLfHCTSEOsG9Pw5ieOgtu7zkf3v/rf1YpiDGDCWd/ga4lBQYRSv3ZODbz9kUk G6cUhv9Z7zxtJ6CP0E49w83x/yO0lBoE2BlqpcSBO/wvGcaa6Xu9QR4JMF18pwvqMX2Q umzON1dFvb+Lx70/piD/ElrHL1l6WJVO5jRSaWpeItJvucEgiVBasifybJR5xyv30YwP ygDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796149092; x=1796753892; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=s4ZZBF8Ylet5jvO6p7s2FQJ47PYPbn1F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MfmqpUKzNuRdVgHFdeBXbdq1xXDctdBzh8sFxO1/2d SFqNqCvvVMs2X9aIqGrtM7dKGPDPSu/egtEwqRJEN64l550s9RGLy63sXrEBHMw= X-Received: by 2002:a17:90b:2701:b0:3b0:ab34:afc8 with SMTP id 98e67ed59e1d1-3b41c8d9280mr34123242a91.20.1796149092601; Tue, 01 Dec 2026 10:18:12 -0800 (PST) Return-Path: Received: from localhost.localdomain ([108.180.159.198]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b41adcafe0sm62089968a91.16.2026.12.01.10.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 10:18:12 -0800 (PST) From: Babanpreet Singh To: openembedded-core@lists.openembedded.org Cc: Paul Barker , Ross Burton , Babanpreet Singh Subject: [PATCH v2] recipetool: create: fix git URLs that only specify a tag Date: Tue, 1 Dec 2026 18:18:11 +0000 Message-ID: <20261201181811.7-1-bbnpreetsingh@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 18:18:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251771 Content-Type: text/plain; charset="utf-8" A git URL with tag= and no branch= fails with: Unable to resolve '' in upstream git repository recipetool fetches it with nobranch=1, which leaves ${AUTOREV} no branch to follow. Fetch the tag itself instead. AI-Generated: Uses Claude (claude-opus-5-5) Signed-off-by: Babanpreet Singh --- meta/lib/oeqa/selftest/cases/recipetool.py | 8 ++++++++ scripts/lib/recipetool/create.py | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 181d95804f..ad5ec226af 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -825,6 +825,14 @@ class RecipetoolCreateTests(RecipetoolBase): self._test_recipetool_create_git('git://git.yoctoproject.org/matchbox-keyboard;branch=matchbox-keyboard-0-1;protocol=https;tag=0.1.1', extravars={'SRCREV': '630d89068dc0a1e9199306d405cb32f892dfa4d3'}) + def test_recipetool_create_git_srcuri_tag(self): + # The 0.1.1 tag is only on the matchbox-keyboard-0-1 branch, so the + # recipe should name that branch rather than master + srcuri = 'git://git.yoctoproject.org/matchbox-keyboard;protocol=https;tag=0.1.1' + self._test_recipetool_create_git(srcuri, + extravars={'SRC_URI': srcuri + ';branch=matchbox-keyboard-0-1', + 'SRCREV': '630d89068dc0a1e9199306d405cb32f892dfa4d3'}) + def _go_urifiy(self, url, version, modulepath = None, pathmajor = None, subdir = None): modulepath = ",path='%s'" % modulepath if len(modulepath) else '' pathmajor = ",pathmajor='%s'" % pathmajor if len(pathmajor) else '' diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 46a321a866..4c20938a82 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -532,6 +532,10 @@ def create_recipe(args): storeTagName = params['tag'] params['nobranch'] = '1' del params['tag'] + if srcrev == '${AUTOREV}': + # nobranch=1 leaves ${AUTOREV} no branch to follow, so + # fetch the tag itself + srcrev = storeTagName # Assume 'master' branch if not set if scheme in ['git', 'gitsm'] and 'branch' not in params and 'nobranch' not in params: params['branch'] = 'master' -- 2.43.0