Bug 11391 - recipetool: create: git URLs containing git@ have parameters stripped out
Summary: recipetool: create: git URLs containing git@ have parameters stripped out
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M2
Assignee: Stanley Phoong
QA Contact: Shashwat Pandey
URL:
Whiteboard:
Depends on:
Blocks: 11394
  Show dependency tree
 
Reported: 2017-04-20 03:31 UTC by Paul Eggleton
Modified: 2017-10-09 03:32 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2017-04-20 03:31:50 UTC
If you specify git@ in a git URL it seems that we're chopping off any parameters, e.g. if you specify branch= then you won't actually get that branch specified in the SRC_URI nor will it be used to check out the source.

For example, if you run:

devtool add --version 2.4.2 mbedtls "git@github.com:ARMmbed/mbedtls.git;branch=mbedtls-2.4"

What you get in the recipe is:

SRC_URI = "git://git@github.com/ARMmbed/mbedtls.git;protocol=ssh"

Also what gets checked out is from master rather than the mbedtls-2.4 branch.

(Also related to bug 11390.)
Comment 1 Stanley Phoong 2017-07-12 09:31:11 UTC
Pushed commit to mailing list for review:
http://lists.openembedded.org/pipermail/openembedded-core/2017-July/139482.html
Comment 3 Shashwat Pandey 2017-10-09 03:32:10 UTC
Verification logs:

a) Checkout to origin/master branch to get the fixes.

b) Scenario1: Run recipetool create command by specifying git@ in the git URL:

	recipetool --color=always create --devtool -o workspace/recipes/mbedtls/mbedtls_git.bb  'git://git@github.com/ARMmbed/mbedtls.git;branch=mbedtls-2.4;protocol=https'  -x workspace/sources/mbedtls  -N mbedtls -V 2.4.2
	
c) Verify that the SRC_URI generated with correct URL:

	SRC_URI = "git://git@github.com/ARMmbed/mbedtls.git;branch=mbedtls-2.4;protocol=https"
	
d) Scenario2: Run devtool add command by specifying git@ in git URL:
	
	devtool add --version 2.4.2 mbedtls "git@github.com:ARMmbed/mbedtls.git;branch=mbedtls-2.4;protocol=https"
	
e) Verify that the SRC_URI generated with correct URL:
	
	SRC_URI = "git://git@github.com/ARMmbed/mbedtls.git;branch=mbedtls-2.4;protocol=https"

f) Verify bitbake mbedtls can build successfully:
	
	pokyuser@c86eac66192a:/workdir/build$ bitbake mbedtls
	Loading cache: 100% |##############################################################################################################################################################| Time: 0:00:00
	Loaded 1303 entries from dependency cache.
	Parsing recipes: 100% |############################################################################################################################################################| Time: 0:00:00
	Parsing of 819 .bb files complete (818 cached, 1 parsed). 1276 targets, 44 skipped, 0 masked, 0 errors.
	NOTE: Resolving any missing task queue dependencies
	
	Build Configuration:
	BB_VERSION        = "1.35.0"
	BUILD_SYS         = "x86_64-linux"
	NATIVELSBSTRING   = "universal"
	TARGET_SYS        = "i586-poky-linux"
	MACHINE           = "qemux86"
	DISTRO            = "poky"
	DISTRO_VERSION    = "2.4"
	TUNE_FEATURES     = "m32 i586"
	TARGET_FPU        = ""
	meta
	meta-poky
	meta-yocto-bsp    = "master:fcdfe09d9cc4e2977bd602dfd18f729cd9f6d73d"
	workspace         = "<unknown>:<unknown>"
	
	Initialising tasks: 100% |#########################################################################################################################################################| Time: 0:00:00
	Checking sstate mirror object availability: 100% |#################################################################################################################################| Time: 0:00:00
	NOTE: Executing SetScene Tasks
	NOTE: Executing RunQueue Tasks
	WARNING: mbedtls-2.4.2+git999-r0 do_populate_lic: mbedtls: No generic license file exists for: Unknown in any provider
	NOTE: mbedtls: compiling from external source tree /workdir/build/workspace/sources/mbedtls
	NOTE: Tasks Summary: Attempted 537 tasks of which 525 didn't need to be rerun and all succeeded.
	
	Summary: There was 1 WARNING message shown.