On Mon, Oct 17, 2011 at 7:21 PM, Jon Ringle <jon@ringle.org> wrote:
ptxd_ipkg_rev_smaller will return the wrong value if the version number
does not include a $micro component.
 
For example:
       pkgd_ipkg_rev_smaller foo_1.0-2_armel.ipk foo_1.0-1_armel.ipk
will incorrectly return 0


After more testing, I found that there were other situations where the version comparison does not work well.

I ended up replacing the implementation of ptxd_ipkg_rev_smaller() with something much simpler, albeit dependent on dpkg that seems to work well:

ptxd_ipkg_rev_smaller() {
    dpkg --compare-versions $1 lt $2
}