Bug 4606 - [Test Case 147] Check if AUTOPR could be export/import for package build
Summary: [Test Case 147] Check if AUTOPR could be export/import for package build
Status: VERIFIED NOTABUG
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-06-04 14:51 UTC by Stoicescu Cornel
Modified: 2013-10-11 11:05 UTC (History)
3 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 Stoicescu Cornel 2013-06-04 14:51:28 UTC
STATUS: FAILED
BUILD: master:676fd3f394a0c0576b63c77ed2184bf5f42c29b6
ENVIRONMENT: Ubuntu 12.04 x86_64
STEPS TO REPRODUCE: 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 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: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 man"
12. check the deploy folder if the packages for man are generated with N+1 PR number compared with the first poky source.

EXPECTED OUTCOME: Check if AUTOPR could be export/import for package build

ACTUAL OUTCOME: packages for man are generated with the same PR number compared with the first poky source.
Comment 1 Stoicescu Cornel 2013-06-18 08:19:38 UTC
I will try and reproduce this issue as it seems to be a little more tricky than what is described. 

As a rough summary, multiple builds must be made in the first poky source that involve adding/removing lines in the man_${PV}.bb file. This stresses the PR server by going back and forth. After exporting and importing the PR server in the second poky source behaves as described in the ACTUAL OUTCOME.
Comment 2 Richard Purdie 2013-06-19 13:48:35 UTC
I did try this locally and it worked for me. We therefore need a better set of steps to reproduce and more information where exactly the process fails.
Comment 3 Richard Purdie 2013-06-20 21:21:42 UTC
Need more information to help reproduce...
Comment 4 Stoicescu Cornel 2013-06-21 09:53:11 UTC
I managed to reproduce this:
you have to add the following steps between 10. and 11.
'bitbake -R export.inc man'
'bitbake -cclean man'

I will try to find more scenarios that fit this.
Comment 5 Stoicescu Cornel 2013-06-21 11:12:58 UTC
Doing the below instead solves the problem:

'bitbake -R export.inc man'
'bitbake -ccleansstate man'
Comment 6 Stoicescu Cornel 2013-07-01 09:14:16 UTC
Info provided
Comment 7 Richard Purdie 2013-10-11 10:50:06 UTC
The issue is that "bitbake -R export.inc man" will build a package with AUTOPR of "1" yet from metadata which does not match the checksum encoded in the export.inc file. It should have really built a package of "2" yet couldn't due to the data not being in the actual PR Server.

I'm not sure this extended test case makes sense. "bitbake -R export.inc man" is not a command that we recommend anywhere in the documentation and it will not behave quite as you'd expect. We only support the use case where data is imported or exported from the PR server, not used in intermediate steps.
Comment 8 Stoicescu Cornel 2013-10-11 11:05:33 UTC
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=146 is now marked as DISABLED