Bug 539 - rpm version compare works incorrectly
Summary: rpm version compare works incorrectly
Status: VERIFIED WONTFIX
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-11-16 19:32 UTC by Ke Yu
Modified: 2010-12-21 06:07 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ke Yu 2010-11-16 19:32:28 UTC
When I upgrade cairo from 1.8.10 to 1.10.0, and doing poky-image-sato do_rootfs,  the zypper will report:

"
| Processing zypper...
| error: Failed dependencies:
|       libcairo2 >= 1.8.10 is needed by screenshot-0.0+svnr292-r0.i586
|       libcairo2 >= 1.8.10 is needed by lttng-viewer-0.12.35-r0.i586
|       libcairo2 >= 1.8.10 is needed by gtk+-2.20.1-r1.i586
|       libcairo2 >= 1.8.10 is needed by pango-1.28.0-r0.i586
|       libcairo2 >= 1.8.10 is needed by libowl0-0.0+svnr408-r6.i586
|       libcairo2 >= 1.8.10 is needed by libfm-0.1.12-r0.i586
|       libcairo2 >= 1.8.10 is needed by librsvg-2-2-2.26.3-r0.i586
|       libcairo2 >= 1.8.10 is needed by libowl-av0-0.0+svnr398-r4.i586
|       libcairo2 >= 1.8.10 is needed by libwebkitgtk-1.0-0-1.3.2+svnr62027-r0.i586
|       libcairo2 >= 1.8.10 is needed by lttng-viewer-dev-0.12.35-r0.i586
|       libcairo-dev is needed by pango-dev-1.28.0-r0.i586
|       libcairo-dev is needed by gtk+-dev-2.20.1-r1.i586
"

cairo 1.10.0 should actually meet the requirement of >=1.8.10, so looks zypper does not correctly compare the version.

if i rebuild those recipes, i.e. increase the PR of the recipes (screenshot, lttng-viewer...) , and build again, the error disappear. the rpm spec becomes:  
Requires: cairo >= 1.10.0

Reproduce step:
1. build poky-image-sato from scratch with poky 4.0
# git checkout laverne-4.0
# . poky-init-build-env
# bitbake poky-image-sato

2. apply the attached patch to upgrade cairo, and build poky-image-sato again
# patch -p1 < cairo.patch
# bitbake poky-image-sato

3. the error will show out.
Comment 1 Jeff Johnson 2010-11-19 13:00:00 UTC
tracked at https://bugs.launchpad.net/rpm/+bug/677641
Comment 2 Ke Yu 2010-11-21 03:00:28 UTC
Dig more and find this is not related to rpm/zypper. it is cairo upgration specific issue:

In cairo 1.8.10, it only contains library, so according to the Debian renaming hook, the package is renamed to libcairo2. the generated rpm is libcairo2-1.8.10-r0.i586.rpm 

when upgrade to cairo 1.10.0, it also has bin executable, so the package name becomes cairo. the generated rpm is cairo-1.10.0-r0.i586.rpm.

in this case, those packages (e.g. screenshot) which depend on libcairo2-1.8.10-r0.i586.rpm can not find libcairo-1.10.0-r0.i586.rpm, and reports dependency failure.

I will update the cairo patch to specifiy the package name as libcairo2 to fix this issue.
Comment 3 Ke Yu 2010-12-13 01:02:23 UTC
verified