From: Jon Ringle <jon@ringle.org>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] ptxd_ipkg_rev_smaller: fix compare with empty micro
Date: Tue, 18 Oct 2011 04:42:46 -0400 [thread overview]
Message-ID: <CAMwGMjwRFb17Z4kZOi+13ucnjjWKE8fmebPTgSxVXPVorxk=Mg@mail.gmail.com> (raw)
In-Reply-To: <1318893704-23961-1-git-send-email-jon@ringle.org>
[-- Attachment #1.1: Type: text/plain, Size: 624 bytes --]
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
}
[-- Attachment #1.2: Type: text/html, Size: 1095 bytes --]
[-- Attachment #2: Type: text/plain, Size: 48 bytes --]
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2011-10-18 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 23:21 Jon Ringle
2011-10-18 8:42 ` Jon Ringle [this message]
2011-10-19 17:46 ` Robert Schwebel
2011-10-19 18:52 ` Bernhard Walle
2011-10-19 19:55 ` Jon Ringle
2011-10-20 6:10 ` Bernhard Walle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMwGMjwRFb17Z4kZOi+13ucnjjWKE8fmebPTgSxVXPVorxk=Mg@mail.gmail.com' \
--to=jon@ringle.org \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox