Bug 5573 - PR Service does not add initial '.0' version to arch independent packages
Summary: PR Service does not add initial '.0' version to arch independent packages
Status: VERIFIED NOTABUG
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.6
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.6 M3
Assignee: Cristian Iorga
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-11-20 11:46 UTC by Stoicescu Cornel
Modified: 2014-01-14 10:18 UTC (History)
4 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-11-20 11:46:49 UTC
The PR Service does not add the initial '.0' version for the 'all' architecture packages(it does this for architecture-dependent packages).

This can be reproduced using the following steps:
1. prepare 1 poky build environments
2. 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"
}
#######

5. re-run "bitbake xcursor-transparent-theme", task do_packge for recipe xcursor-transparent-theme should be re-run
6. check the xcursor-transparent-theme package built out under deploy folder, the PR number should bump up automatically

OUTCOME:
After step 4) we get the following package name: 
tmp/deploy/rpm/all/xcursor-transparent-theme-0.1.1-r4.all.rpm
After step 6 we get the following package name:
tmp/deploy/rpm/all/xcursor-transparent-theme-0.1.1-r4.1.all.rpm

NOTE: For architecture dependent packages, a '.0' is added as the package version like so:
tmp/deploy/rpm/x86_64/m4-1.4.17-r0.0.x86_64.rpm
Comment 1 Stoicescu Cornel 2013-12-18 15:39:38 UTC
After further analysis I came up with better steps to reproduce. This bug is actually about the fact that rebuilding packages from shared state ignores the PR Service. This can also make PR numbers go backwards if rebuilding an older version from shared state.

This can be reproduced using the following steps:
1. prepare 1 poky build environment
2. issue 'bitbake xcursor-transparent-theme'
3. issue 'bitbake -cclean xcursor-transparent-theme'
4. set PRSERV_HOST to localhost:0 in local.conf
5. issue 'bitbake xcursor-transparent-theme"'

Notice package naming does not contain PR number:
tmp/deploy/rpm/all/xcursor-transparent-theme-0.1.1-r4.all.rpm

The package should be named something like this:
tmp/deploy/rpm/all/xcursor-transparent-theme-0.1.1-r4.0.all.rpm

Also, pkgdata contains faulty PR version:
cornel@NODE1:~/SSD/poky/2build$ head tmp/sysroots/qemux86-64/pkgdata/runtime/xcursor-transparent-theme
PN: xcursor-transparent-theme
PV: 0.1.1
PR: r4
PKGV: 0.1.1
PKGR: r4
LICENSE: GPLv2
DESCRIPTION: Transparent xcursor theme for handheld systems
SUMMARY: xcursor-transparent-theme version 0.1.1-r4
SECTION: x11/base
PKG_xcursor-transparent-theme: xcursor-transparent-theme
Comment 2 Irina Patru 2013-12-20 09:58:32 UTC
Internally, the PR Server knows the current PR number, but it is not shown in the package name because that one is taken exactly as it is from shared state.
This can be justified by the fact that making changes to the recipe before calling bitbake will get '.1' in the PR number. 

If bitbake is issued after a -c cleansstate (not a -c clean), the appropriate package name is given:
tmp/deploy/rpm/all/xcursor-transparent-theme-0.1.1-r4.0.all.rpm

Since this is not a problem with the PR service, it can be classified as NOTABUG.
Comment 3 Stoicescu Cornel 2014-01-14 10:18:03 UTC
Setting to Verified.