Bug 2233

Summary: invalid error message "Package version for package ... went backwards"
Product: [Build System, Metadata & Runtime] Other YP Layers Reporter: Andreas Oberritter <obi>
Component: layersAssignee: Lianhao Lu <lianhao.lu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, lianhao.lu, meta.layer.watcher, meta.watcher, sgw
Version: unspecified   
Target Milestone: 1.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard: (1.2)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Andreas Oberritter 2012-04-02 22:59:18 UTC
When appending strings to PR, errors like these appear, causing bitbake to return a non-zero exit code:

ERROR: Package version for package mtd-utils-dbg went backwards which would break package feeds from (0:1.4.9-r1 to 0:1.4.9-r1-dream1)
ERROR: Package version for package mtd-utils-staticdev went backwards which would break package feeds from (0:1.4.9-r1 to 0:1.4.9-r1-dream1)
ERROR: Package version for package mtd-utils went backwards which would break package feeds from (0:1.4.9-r1 to 0:1.4.9-r1-dream1)
ERROR: Package version for package mtd-utils-doc went backwards which would break package feeds from (0:1.4.9-r1 to 0:1.4.9-r1-dream1)
ERROR: Package version for package mtd-utils-dev went backwards which would break package feeds from (0:1.4.9-r1 to 0:1.4.9-r1-dream1)
ERROR: Package version for package mtd-utils-locale went backwards which would break package feeds from (0:1.4.9-r1 to 0:1.4.9-r1-dream1)

However, the feed isn't broken. Running opkg upgrade works as expected:

Upgrading mtd-utils on root from 1.4.9-r1 to 1.4.9-r1-dream1...

This also happens with "r1" vs. "r1.1", for example.

On Feb 24, I reported this to the OE-Core mailing list.
http://comments.gmane.org/gmane.comp.handhelds.openembedded.core/15986

Regards,
Andreas
Comment 1 Lianhao Lu 2012-04-09 03:35:06 UTC
Some initial investigation result at 
http://lists.linuxtogo.org/pipermail/bitbake-devel/2012-April/002641.html
Comment 2 Lianhao Lu 2012-04-10 14:18:20 UTC
This bug should be fixed in the following steps:

1. update opkg-compare-versions to match the latest opkg.
2. modify the bitbake bb.utils.vercmp() to match opkg.
3. check bitbake bb.utils.vercmp_string() if it's consistent with opkg.
4. check if the above steps results different build result, especially the rpm build and other openembedded build.
Comment 3 Lianhao Lu 2012-04-12 09:38:22 UTC
(In reply to comment #2)
> This bug should be fixed in the following steps:
> 
> 1. update opkg-compare-versions to match the latest opkg.
The patch for opkg-utils upgrade is at http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=llu/opkg-utils&id=bffb0b638d931fb399fdc1d9d455c661a6c141ce, pending for review & merge.

We also need a update to opkg-utils' recipe in metadata after the upstream check in the above patch.

> 2. modify the bitbake bb.utils.vercmp() to match opkg.
The patch is sent out for review/merge at
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=llu/vercmp_bitbake&id=00fda8f184223f4e189786da33d2c7d6b9c617fe.

> 3. check bitbake bb.utils.vercmp_string() if it's consistent with opkg.
> 4. check if the above steps results different build result, especially the rpm
> build and other openembedded build.