Bug 5658

Summary: Manual build for nuc image-sato-sdk failed due to patch failing to apply
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ionut Chisanovici <ionutx.chisanovici>
Component: coreAssignee: Saul Wold <sgw>
Status: VERIFIED FIXED QA Contact: Ionut Chisanovici <ionutx.chisanovici>
Severity: normal    
Priority: Medium CC: bogdanx.a.voiculescu, dvhart, meta.mr.watcher, meta.watcher
Version: 1.6   
Target Milestone: 1.6   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Ionut Chisanovici 2013-12-12 09:19:37 UTC
Build Configuration:
BB_VERSION        = "1.21.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-13.04"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "nuc"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5+snapshot-20131212"
TUNE_FEATURES     = "m64"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:bfec6b1947b472d6f1c9c7f297e66ede5e921069"
meta-intel        
meta-nuc          = "master:a649e92498d234f2d0d52f3da5a85bdc87296c23"

bitbake core-image-sato-sdk

Outcome result when failed:

ERROR: Command Error: exit status: 1  Output:
Applying patch 0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
patch: **** Only garbage was found in the patch input.
Patch 0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch does not apply (enforce with -f)
ERROR: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/ionut/work/poky/build/tmp/work/x86_64-poky-linux/ltp/20130904-r0/temp/log.do_patch.1573
ERROR: Task 2352 (/home/ionut/work/poky/meta/recipes-extended/ltp/ltp_20130904.bb, do_patch) failed with exit code '1'


ionut@ionut-ubuntu:~/work/poky/build$ cat /home/ionut/work/poky/build/tmp/work/x86_64-poky-linux/ltp/20130904-r0/temp/log.do_patch.1573
DEBUG: Executing python function do_patch
DEBUG: Executing python function patch_do_patch
DEBUG: Searching for 0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch in paths:    
/home/ionut/work/poky/meta/recipes-extended/ltp/ltp-20130904/poky
    /home/ionut/work/poky/meta/recipes-extended/ltp/ltp/poky
    /home/ionut/work/poky/meta/recipes-extended/ltp/files/poky
    /home/ionut/work/poky/meta/recipes-extended/ltp/ltp-20130904/nuc
    /home/ionut/work/poky/meta/recipes-extended/ltp/ltp/nuc
    /home/ionut/work/poky/meta/recipes-extended/ltp/files/nuc
    /home/ionut/work/poky/meta/recipes-extended/ltp/ltp-20130904/x86-64
    /home/ionut/work/poky/meta/recipes-extended/ltp/ltp/x86-64
    /home/ionut/work/poky/meta/recipes-extended/ltp/files/x86-64
    /home/ionut/work/poky/meta/recipes-extended/ltp/ltp-20130904/
    /home/ionut/work/poky/meta/recipes-extended/ltp/ltp/
    /home/ionut/work/poky/meta/recipes-extended/ltp/files/
NOTE: Applying patch '0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch' (../meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch)
ERROR: Command Error: exit status: 1  Output:
Applying patch 0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
patch: **** Only garbage was found in the patch input.
Patch 0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch does not apply (enforce with -f)
DEBUG: Python function patch_do_patch finished
DEBUG: Python function do_patch finished
ERROR: Function failed: patch_do_patch
Comment 1 Darren Hart 2013-12-12 15:57:37 UTC
Can you share the content of the patch referenced? Looks as though the file was corrupted - possibly a bad download or a manual edit?

meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch

Perhaps compare what you have here with a fresh checkout of poky.
Comment 2 Saul Wold 2013-12-12 20:53:50 UTC
See prior comment
Comment 3 Ionut Chisanovici 2013-12-19 11:36:08 UTC
Hi,

I did another two builds today (fresh environments):
1. using the latest master commits for both poky and meta-intel (master:2961b58640daa8078ae3a70028f0fbbf2abb7882 / master:a665015a6a95be732eeee8f7a915fcf0e030c112) and the build was ok, without errors.
2. using: 
meta-yocto-bsp    = "master:bfec6b1947b472d6f1c9c7f297e66ede5e921069"
meta-intel        
meta-nuc          = "master:a649e92498d234f2d0d52f3da5a85bdc87296c23" 
, the build crashed again, the same error:

ERROR: Command Error: exit status: 1  Output:
Applying patch 0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
patch: **** Only garbage was found in the patch input.
Patch 0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch does not apply (enforce with -f)
ERROR: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/ionut/work/poky/build/tmp/work/x86_64-poky-linux/ltp/20130904-r0/temp/log.do_patch.29469
ERROR: Task 2352 (/home/ionut/work/poky/meta/recipes-extended/ltp/ltp_20130904.bb, do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1496 tasks of which 45 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /home/ionut/work/poky/meta/recipes-extended/ltp/ltp_20130904.bb, do_patch
Summary: There were 9 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

It seems that the meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch patch file on this commit is corrupted or incomplete.

Below the content of the patch:

ionut@ionut-ubuntu:~/work/poky/build$ cat ../meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 7 Dec 2013 18:24:32 +0100
Subject: [PATCH] Rename runtests_noltp.sh script so have unique name

* they are installed in the same target path
  /opt/ltp/testcases/bin/runtests_noltp.sh
  and overwrite each other in non-deterministic way
  when multiple processes are used in "make install"

  ./temp/log.do_install:install -m 00775
    "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh"
    "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
  ./temp/log.do_install:install -m 00775
    "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh"
    "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"

Upstream-Status: Pending

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../kernel/containers/sysvipc/{runtests_noltp.sh => runipctests_noltp.sh} | 0
 .../kernel/containers/utsname/{runtests_noltp.sh => runutstests_noltp.sh} | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename testcases/kernel/containers/sysvipc/{runtests_noltp.sh => runipctests_noltp.sh} (100%)
 rename testcases/kernel/containers/utsname/{runtests_noltp.sh => runutstests_noltp.sh} (100%)

diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
similarity index 100%
rename from testcases/kernel/containers/sysvipc/runtests_noltp.sh
rename to testcases/kernel/containers/sysvipc/runipctests_noltp.sh
diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh
similarity index 100%
rename from testcases/kernel/containers/utsname/runtests_noltp.sh
rename to testcases/kernel/containers/utsname/runutstests_noltp.sh
-- 
1.8.4.3

Cheers,
Ionut C
Comment 4 Saul Wold 2013-12-19 15:07:17 UTC
Yes, I saw there was a new patch from Martin to fix this issue, so I think this 
can be closed.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ab0c7af8f971a0846a4a6c7fb07f1c17e7c96604
Comment 5 Ionut Chisanovici 2013-12-20 10:16:34 UTC
This has been verified.

IonutC