Bug 6528 - Case 147 - Check if AUTOPR could be export/import for package build (pre 1.6)
Summary: Case 147 - Check if AUTOPR could be export/import for package build (pre 1.6)
Status: RESOLVED INVALID
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.5.3
Hardware: x86 Multiple
: Low normal
Target Milestone: 1.5.3
Assignee: Richard Purdie
QA Contact: Costin
URL:
Whiteboard: 1.5.4
Depends on:
Blocks:
 
Reported: 2014-07-14 09:36 UTC by Costin
Modified: 2014-07-25 15:31 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Costin 2014-07-14 09:36:43 UTC
Hello,

While performing tests for Testopia Test Case 147 

"Case 147 - Check if AUTOPR could be export/import for package build (pre 1.6)" :

"
1. prepare 2 poky build environments

2. in one of the poky source, set PRSERV_HOST to localhost:0 in local.conf
4. run "bitbake xcursor-transparent-theme" and then add following lines into xcursor-transparent-theme_${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 xcursor-transparent-theme", and check the deploy folder if the packages for xcursor-transparent-theme 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:0 in local.conf

10. copy export.inc into the second poky source's build directory
11. run "bitbake-prserv-tool import export.inc" and run "bitbake xcursor-transparent-theme"
12. check the deploy folder if the packages for xcursor-transparent-theme are generated with N+1 PR number compared with the first poky source.
"

after exporting the export.inc, in the second build environment, I get this error message :

"
cosscat@cosscat:/media/work/2poky/build$ bitbake-prserv-tool import export.inc
WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR: Only one copy of bitbake should be run against a build directory
Importing from file export.inc failed!
cosscat@cosscat:/media/work/2poky/build$ 
"

The local.conf file contains the required: PRSERV_HOST = "localhost:0"

Initially I thought it's something from having a background bitbake process running, but ...

"
cosscat@cosscat:/media/work/2poky/build$ ps -eaf | grep -i bitbake
cosscat   3432  2457  0 12:13 pts/17   00:00:00 grep --color=auto -i bitbake
"

The build dir looks like: 
"
cosscat@cosscat:/media/work/2poky/build$ ls -ltr
total 20
-rw-rw-r-- 1 cosscat cosscat  503 iul 14 12:06 export.inc
drwxrwxr-x 2 cosscat cosscat 4096 iul 14 12:08 tmp
drwxrwxr-x 2 cosscat cosscat 4096 iul 14 12:08 sstate-cache
drwxrwxr-x 2 cosscat cosscat 4096 iul 14 12:08 conf
-rw-rw-r-- 1 cosscat cosscat    0 iul 14 12:08 bitbake.lock
drwxrwxr-x 2 cosscat cosscat 4096 iul 14 12:08 cache
"

Tried to remove the bitbake.lock file, but same error.

After building something random:

"
cosscat@cosscat:/media/work/2poky/build$ bitbake core-image-minimal
WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
NOTE: Started PRServer with DBfile: /media/work/2poky/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 56990, PID: 3491
Parsing recipes: 100% |##################################################################################################################################################################################################| Time: 00:00:21
Parsing of 855 .bb files complete (0 cached, 855 parsed). 1187 targets, 35 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.20.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5.3"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "(detachedfromdc74374):dc743744d8e3a9caef577aeab6b7f51bc08ded17"
...
"

everything goes smooth.

"
cosscat@cosscat:/media/work/2poky/build$ bitbake-prserv-tool import export.inc
WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
NOTE: Started PRServer with DBfile: /media/work/2poky/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 44225, PID: 3655
NOTE: imported (xcursor-transparent-theme-0.1.1-r4,all,eb849eae1b75c757019ec18f6de0b929,3)#############################################################################################################################  | ETA:  00:00:00
Parsing recipes: 100% |##################################################################################################################################################################################################| Time: 00:00:10
Parsing of 855 .bb files complete (0 cached, 855 parsed). 1187 targets, 35 skipped, 0 masked, 0 errors.

Summary: There was 1 WARNING message shown.
Importing from file export.inc succeeded!

&&


cosscat@cosscat:/media/work/2poky/build$ bitbake xcursor-transparent-theme
WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
NOTE: Started PRServer with DBfile: /media/work/2poky/build/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 42005, PID: 3835
Parsing recipes: 100% |##################################################################################################################################################################################################| Time: 00:00:10
Parsing of 855 .bb files complete (0 cached, 855 parsed). 1187 targets, 35 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.20.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "poky"
DISTRO_VERSION    = "1.5.3"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "(detachedfromdc74374):dc743744d8e3a9caef577aeab6b7f51bc08ded17"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 379 tasks of which 101 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
cosscat@cosscat:/media/work/2poky/build$ 
"

All the above is valid both for a fresh clone of poky and for an alredy existant one. For both cases, the build dir should be a fresh new one.  

poky commit used: dc743744d8e3a9caef577aeab6b7f51bc08ded17

Regards,

Costin
Comment 1 Richard Purdie 2014-07-25 15:31:01 UTC
See https://bugzilla.yoctoproject.org/show_bug.cgi?id=4606, this test case doesn't make sense.