mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 03:49:07 +02:00
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: 5340c0d688036c1be6c938f05d8a8c1e3b49ec38) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ddcf16d1f7
commit
dc53fe75cc
|
@ -53,5 +53,5 @@ KERNEL_IMAGETYPES ??= "${KERNEL_IMAGETYPE}"
|
|||
# The CONNECTIVITY_CHECK_URIS are used to test whether we can succesfully
|
||||
# fetch from the network (and warn you if not). To disable the test set
|
||||
# the variable to be empty.
|
||||
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master
|
||||
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master;branch=master
|
||||
CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
|
||||
|
|
|
@ -340,7 +340,7 @@ class DevtoolAddTests(DevtoolBase):
|
|||
checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'
|
||||
checkvars['S'] = '${WORKDIR}/git'
|
||||
checkvars['PV'] = '0.1+git${SRCPV}'
|
||||
checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https'
|
||||
checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https;branch=master'
|
||||
checkvars['SRCREV'] = srcrev
|
||||
checkvars['DEPENDS'] = set(['dbus'])
|
||||
self._test_recipe_contents(recipefile, checkvars, [])
|
||||
|
@ -904,7 +904,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
|||
self._check_repo_status(os.path.dirname(recipefile), expected_status)
|
||||
|
||||
result = runCmd('git diff %s' % os.path.basename(recipefile), cwd=os.path.dirname(recipefile))
|
||||
addlines = ['SRCREV = ".*"', 'SRC_URI = "git://git.infradead.org/mtd-utils.git"']
|
||||
addlines = ['SRCREV = ".*"', 'SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master"']
|
||||
srcurilines = src_uri.split()
|
||||
srcurilines[0] = 'SRC_URI = "' + srcurilines[0]
|
||||
srcurilines.append('"')
|
||||
|
|
|
@ -357,7 +357,7 @@ class RecipetoolTests(RecipetoolBase):
|
|||
tempsrc = os.path.join(self.tempdir, 'srctree')
|
||||
os.makedirs(tempsrc)
|
||||
recipefile = os.path.join(self.tempdir, 'libmatchbox.bb')
|
||||
srcuri = 'git://git.yoctoproject.org/libmatchbox'
|
||||
srcuri = 'git://git.yoctoproject.org/libmatchbox;branch=master'
|
||||
result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri + ";rev=9f7cf8895ae2d39c465c04cc78e918c157420269", '-x', tempsrc])
|
||||
self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
|
||||
checkvars = {}
|
||||
|
@ -447,7 +447,7 @@ class RecipetoolTests(RecipetoolBase):
|
|||
self.assertTrue(os.path.isfile(recipefile))
|
||||
checkvars = {}
|
||||
checkvars['LICENSE'] = set(['Apache-2.0'])
|
||||
checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https'
|
||||
checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=master'
|
||||
inherits = ['setuptools3']
|
||||
self._test_recipe_contents(recipefile, checkvars, inherits)
|
||||
|
||||
|
@ -514,7 +514,7 @@ class RecipetoolTests(RecipetoolBase):
|
|||
self.assertTrue(os.path.isfile(recipefile))
|
||||
checkvars = {}
|
||||
checkvars['LICENSE'] = set(['GPLv2'])
|
||||
checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/matchbox-terminal;protocol=http'
|
||||
checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/matchbox-terminal;protocol=http;branch=master'
|
||||
inherits = ['pkgconfig', 'autotools']
|
||||
self._test_recipe_contents(recipefile, checkvars, inherits)
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class SStateTests(SStateBase):
|
|||
|
||||
recipefile = os.path.join(tempdir, "recipes-test", "dbus-wait-test", 'dbus-wait-test_git.bb')
|
||||
os.makedirs(os.path.dirname(recipefile))
|
||||
srcuri = 'git://' + srcdir + ';protocol=file'
|
||||
srcuri = 'git://' + srcdir + ';protocol=file;branch=master'
|
||||
result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri])
|
||||
self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
|
||||
|
||||
|
|
|
@ -389,6 +389,9 @@ def reformat_git_uri(uri):
|
|||
parms.update({('protocol', 'ssh')})
|
||||
elif (scheme == "http" or scheme == 'https' or scheme == 'ssh') and not ('protocol' in parms):
|
||||
parms.update({('protocol', scheme)})
|
||||
# We assume 'master' branch if not set
|
||||
if not 'branch' in parms:
|
||||
parms.update({('branch', 'master')})
|
||||
# Always append 'git://'
|
||||
fUrl = bb.fetch2.encodeurl(('git', host, path, user, pswd, parms))
|
||||
return fUrl
|
||||
|
|
Loading…
Reference in New Issue
Block a user