[oe-commits] Bruce Ashfield : kernel-yocto: fix non-git builds

git at git.openembedded.org git at git.openembedded.org
Sun Dec 21 12:38:25 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: d5451dda1b8cfbbe8b6a779b0cd9b1397ebf1a07
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d5451dda1b8cfbbe8b6a779b0cd9b1397ebf1a07

Author: Bruce Ashfield <bruce.ashfield at windriver.com>
Date:   Fri Nov 21 23:51:58 2014 -0500

kernel-yocto: fix non-git builds

The ability to build non-git repositories was broken by two changes:

 - The existence of an empty 'patches' directory created during the
   unpack phase. This dir was incorrectly identified as a valid meta
   directory and broke the build. By ensuring that it is removed before
   creating the empty repository, it will no longer be found instead of
   the real meta directory.

 - The attempt to reset the git repository to a specific SRCREV when
   no SRCREV was provided. By checking for a SRCREV of 'INVALID', we
   avoid any processing and failed git operations.

Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>

---

 meta/classes/kernel-yocto.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 45bdc96..5706a9e 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -179,9 +179,11 @@ do_kernel_checkout() {
 			bberror "S is not set to the linux source directory. Check "
 			bbfatal "the recipe and set S to the proper extracted subdirectory"
 		fi
+		rm -f .gitignore
 		git init
 		git add .
 		git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
+		git clean -d -f
 	fi
 	# end debare
 
@@ -287,7 +289,7 @@ do_validate_branches() {
 	if [ "${machine_srcrev}" = "AUTOINC" ]; then
 		bbnote "SRCREV validation is not required for AUTOREV"
 	elif [ "${machine_srcrev}" = "" ]; then
-		if [ "${SRCREV}" != "AUTOINC" ]; then
+		if [ "${SRCREV}" != "AUTOINC" ] && [ "${SRCREV}" != "INVALID" ]; then
 		       # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe
 		       # that doesn't use the SRCREV_FORMAT "machine_meta" is being built. In
 		       # this case, we need to reset to the give SRCREV before heading to patching



More information about the Openembedded-commits mailing list