summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-29 13:34:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-11 10:54:32 +0000
commit31007eb03e22cc20a1841af5781ba16e3dfbe340 (patch)
tree41141e20485c99a05204a20a3e808e78d5f449bb
parent07be05c69896b6d9f4da4b3ba122a1668c8c1200 (diff)
downloadpoky-31007eb03e22cc20a1841af5781ba16e3dfbe340.tar.gz
meta/scripts: Manual git url branch additions
Following the scripted conversion adding branches to git:// SRC_URI entries, add the remaining references, mainly in the selftests and recipetool. (From OE-Core rev: 38fc0807eea14dc12610da4ba73c082d5a4b0744) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5340c0d688036c1be6c938f05d8a8c1e3b49ec38) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/default-distrovars.inc2
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py4
-rw-r--r--meta/lib/oeqa/selftest/cases/recipetool.py6
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py2
-rw-r--r--scripts/lib/recipetool/create.py3
5 files changed, 10 insertions, 7 deletions
diff --git a/meta/conf/distro/include/default-distrovars.inc b/meta/conf/distro/include/default-distrovars.inc
index 433d4b6651..0240589c81 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -47,5 +47,5 @@ KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
47# The CONNECTIVITY_CHECK_URIS are used to test whether we can succesfully 47# The CONNECTIVITY_CHECK_URIS are used to test whether we can succesfully
48# fetch from the network (and warn you if not). To disable the test set 48# fetch from the network (and warn you if not). To disable the test set
49# the variable to be empty. 49# the variable to be empty.
50# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master 50# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master;branch=master
51CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/" 51CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 0985434238..713efd71bd 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -340,7 +340,7 @@ class DevtoolAddTests(DevtoolBase):
340 checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263' 340 checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'
341 checkvars['S'] = '${WORKDIR}/git' 341 checkvars['S'] = '${WORKDIR}/git'
342 checkvars['PV'] = '0.1+git${SRCPV}' 342 checkvars['PV'] = '0.1+git${SRCPV}'
343 checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https' 343 checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https;branch=master'
344 checkvars['SRCREV'] = srcrev 344 checkvars['SRCREV'] = srcrev
345 checkvars['DEPENDS'] = set(['dbus']) 345 checkvars['DEPENDS'] = set(['dbus'])
346 self._test_recipe_contents(recipefile, checkvars, []) 346 self._test_recipe_contents(recipefile, checkvars, [])
@@ -880,7 +880,7 @@ class DevtoolUpdateTests(DevtoolBase):
880 self._check_repo_status(os.path.dirname(recipefile), expected_status) 880 self._check_repo_status(os.path.dirname(recipefile), expected_status)
881 881
882 result = runCmd('git diff %s' % os.path.basename(recipefile), cwd=os.path.dirname(recipefile)) 882 result = runCmd('git diff %s' % os.path.basename(recipefile), cwd=os.path.dirname(recipefile))
883 addlines = ['SRCREV = ".*"', 'SRC_URI = "git://git.infradead.org/mtd-utils.git"'] 883 addlines = ['SRCREV = ".*"', 'SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master"']
884 srcurilines = src_uri.split() 884 srcurilines = src_uri.split()
885 srcurilines[0] = 'SRC_URI = "' + srcurilines[0] 885 srcurilines[0] = 'SRC_URI = "' + srcurilines[0]
886 srcurilines.append('"') 886 srcurilines.append('"')
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py
index c2ade2543a..e8aeea3023 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -370,7 +370,7 @@ class RecipetoolTests(RecipetoolBase):
370 tempsrc = os.path.join(self.tempdir, 'srctree') 370 tempsrc = os.path.join(self.tempdir, 'srctree')
371 os.makedirs(tempsrc) 371 os.makedirs(tempsrc)
372 recipefile = os.path.join(self.tempdir, 'libmatchbox.bb') 372 recipefile = os.path.join(self.tempdir, 'libmatchbox.bb')
373 srcuri = 'git://git.yoctoproject.org/libmatchbox' 373 srcuri = 'git://git.yoctoproject.org/libmatchbox;branch=master'
374 result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri + ";rev=9f7cf8895ae2d39c465c04cc78e918c157420269", '-x', tempsrc]) 374 result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri + ";rev=9f7cf8895ae2d39c465c04cc78e918c157420269", '-x', tempsrc])
375 self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output) 375 self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
376 checkvars = {} 376 checkvars = {}
@@ -456,7 +456,7 @@ class RecipetoolTests(RecipetoolBase):
456 self.assertTrue(os.path.isfile(recipefile)) 456 self.assertTrue(os.path.isfile(recipefile))
457 checkvars = {} 457 checkvars = {}
458 checkvars['LICENSE'] = set(['Apache-2.0']) 458 checkvars['LICENSE'] = set(['Apache-2.0'])
459 checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https' 459 checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=master'
460 inherits = ['setuptools3'] 460 inherits = ['setuptools3']
461 self._test_recipe_contents(recipefile, checkvars, inherits) 461 self._test_recipe_contents(recipefile, checkvars, inherits)
462 462
@@ -523,7 +523,7 @@ class RecipetoolTests(RecipetoolBase):
523 self.assertTrue(os.path.isfile(recipefile)) 523 self.assertTrue(os.path.isfile(recipefile))
524 checkvars = {} 524 checkvars = {}
525 checkvars['LICENSE'] = set(['GPLv2']) 525 checkvars['LICENSE'] = set(['GPLv2'])
526 checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/matchbox-terminal;protocol=http' 526 checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/matchbox-terminal;protocol=http;branch=master'
527 inherits = ['pkgconfig', 'autotools'] 527 inherits = ['pkgconfig', 'autotools']
528 self._test_recipe_contents(recipefile, checkvars, inherits) 528 self._test_recipe_contents(recipefile, checkvars, inherits)
529 529
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index f0c94c8422..1bfe88c87d 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -39,7 +39,7 @@ class SStateTests(SStateBase):
39 39
40 recipefile = os.path.join(tempdir, "recipes-test", "dbus-wait-test", 'dbus-wait-test_git.bb') 40 recipefile = os.path.join(tempdir, "recipes-test", "dbus-wait-test", 'dbus-wait-test_git.bb')
41 os.makedirs(os.path.dirname(recipefile)) 41 os.makedirs(os.path.dirname(recipefile))
42 srcuri = 'git://' + srcdir + ';protocol=file' 42 srcuri = 'git://' + srcdir + ';protocol=file;branch=master'
43 result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri]) 43 result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri])
44 self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output) 44 self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
45 45
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 566c75369a..116bdfd697 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -389,6 +389,9 @@ def reformat_git_uri(uri):
389 parms.update({('protocol', 'ssh')}) 389 parms.update({('protocol', 'ssh')})
390 elif (scheme == "http" or scheme == 'https' or scheme == 'ssh') and not ('protocol' in parms): 390 elif (scheme == "http" or scheme == 'https' or scheme == 'ssh') and not ('protocol' in parms):
391 parms.update({('protocol', scheme)}) 391 parms.update({('protocol', scheme)})
392 # We assume 'master' branch if not set
393 if not 'branch' in parms:
394 parms.update({('branch', 'master')})
392 # Always append 'git://' 395 # Always append 'git://'
393 fUrl = bb.fetch2.encodeurl(('git', host, path, user, pswd, parms)) 396 fUrl = bb.fetch2.encodeurl(('git', host, path, user, pswd, parms))
394 return fUrl 397 return fUrl