Bug 2313

Summary: bitbake fails to build against lockdown exported file
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Jiajun Xu <jiajun.xu>
Component: meta-yoctoAssignee: Lianhao Lu <lianhao.lu>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, richard.purdie
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
Whiteboard: (1.2)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jiajun Xu 2012-04-17 14:29:16 UTC
tree/branch: poky/1.2_M4
commit: fae1c7a5fdcea199338b5f91efaafd7c72aec5dd

In 1.2 M4 RC3, I find that bitbake fails to build against lockdown exported file, which could pass in 1.2 M4 RC2.

The error log as below:
########
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 170 of 689 (ID: 105, /home/jxu49/osel/poky/meta/recipes-core/eglibc/eglibc_2.13.bb, do_install)
NOTE: Running task 357 of 689 (ID: 442, /home/jxu49/osel/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.2.bb, do_package)
NOTE: Running task 381 of 689 (ID: 539, virtual:native:/home/jxu49/osel/poky/meta/recipes-core/gettext/gettext_0.18.1.1.bb, do_compile)
NOTE: package eglibc-2.13-r23+svnr15508: task do_install: Started
NOTE: package linux-libc-headers-3.2-r1: task do_package: Started
ERROR: Can NOT get PRAUTO from lockdown exported file
ERROR: Function failed: package_get_auto_pr
ERROR: Logfile of failure stored in: /home/jxu49/osel/poky/pr/tmp/work/i586-poky-linux/linux-libc-headers-3.2-r1/temp/log.do_package.30482
NOTE: package linux-libc-headers-3.2-r1: task do_package: Failed
NOTE: package gettext-native-0.18.1.1-r11: task do_compile: Started
ERROR: Task 442 (/home/jxu49/osel/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.2.bb, do_package) failed with exit code '1'
Waiting for 2 running tasks to finish:
0: eglibc-2.13-r23+svnr15508 do_install (pid 30479)
1: gettext-native-0.18.1.1-r11 do_compile (pid 30485)
NOTE: package gettext-native-0.18.1.1-r11: task do_compile: Succeeded
Waiting for 1 running tasks to finish:
0: eglibc-2.13-r23+svnr15508 do_install (pid 30479)
NOTE: package eglibc-2.13-r23+svnr15508: task do_install: Succeeded
NOTE: Tasks Summary: Attempted 600 tasks of which 597 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/jxu49/osel/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.2.bb, do_package
########

The steps I use to reproduce the issue as below:
1. prepare 2 poky build environments
2. in one of the poky source, set PRSERV_HOST to localhost and PRSERV_PORT to 0 in local.conf
4. run "bitbake man" and then add following lines into man_${PV}.bb
#######
do_package_append() {
        bb.build.exec_func('do_test_prserv', d)
}

do_test_prserv() {
 echo "Test if PR service could work"
}
#######
7. re-run "bitbake man", and check the deploy folder if the packages for man are re-generated with PR number bump up
8. run "bitbake-prserv-tool export export.inc"
9. in the second poky source, set PRSERV_HOST to localhost and PRSERV_PORT to 0 in local.conf
10. run "bitbake -R export.inc man"
Comment 1 Lianhao Lu 2012-04-18 02:52:30 UTC
can NOT reproduce the issue using the steps mentioned in comment #1.
Comment 2 Lianhao Lu 2012-04-18 03:11:11 UTC
After a discussion with Jiaju,  it seems that in the "exporter" building, many required packages do_package task(i.e. eglibc, libgcc, bash, etc) are not executed, which result in incomplete information stored in the PR database. We guess these tasks might be executed before enabling the local PR database.

He'll use a clean environment to verify this.
Comment 3 Jiajun Xu 2012-04-18 15:44:17 UTC
I tried a clean build and now lockdown exported file could work. Mark the bug as INVALID.