From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-qw0-f44.google.com ([209.85.216.44]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1RGcEP-0006ri-7K for ptxdist@pengutronix.de; Wed, 19 Oct 2011 21:55:18 +0200 Received: by qadb12 with SMTP id b12so2078256qad.31 for ; Wed, 19 Oct 2011 12:55:10 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4E9F1C64.6040604@bwalle.de> References: <1318893704-23961-1-git-send-email-jon@ringle.org> <20111019174624.GN7130@pengutronix.de> <4E9F1C64.6040604@bwalle.de> Date: Wed, 19 Oct 2011 15:55:10 -0400 Message-ID: From: Jon Ringle Subject: Re: [ptxdist] [PATCH] ptxd_ipkg_rev_smaller: fix compare with empty micro Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1034577715==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de --===============1034577715== Content-Type: multipart/alternative; boundary=bcaec5215fb7b2b3e104afac377f --bcaec5215fb7b2b3e104afac377f Content-Type: text/plain; charset=ISO-8859-1 On Wed, Oct 19, 2011 at 2:52 PM, Bernhard Walle wrote: > Am 19.10.2011 19:46, schrieb Robert Schwebel: > > On Tue, Oct 18, 2011 at 04:42:46AM -0400, Jon Ringle wrote: >> >>> 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 >>> } >>> >> >> Hmm, that makes us dependend on dpkg (and thus on Debian). PTXdist tries >> hard to run on any distribution, so I'm not happy with this. >> > > Maybe Perl would be okay? > > http://www.emdebian.org/trac/**browser/current/target/dpkg/** > trunk/scripts/Dpkg/Version.pm?**rev=6998 > > Seems to be quite official, and the Dpkg::ErrorHandling and Dpkg::Gettext > could be easily removed. > > What do you think about the bash implementation found here: http://lists.us.dell.com/pipermail/dkms-devel/2004-July/000142.html Jon --bcaec5215fb7b2b3e104afac377f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Wed, Oct 19, 2011 at 2:52 PM, Bernhard W= alle <bernhard@b= walle.de> wrote:
Am 19.10.2011 19:46, schrieb Robert Schwebel:

On Tue, Oct 18, 2011 at 04:42:46AM -0400, Jon Ringle wrote:
After more testing, I found that there were other situations where the vers= ion
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() {
=A0 =A0 dpkg --compare-versions $1 lt $2
}

Hmm, that makes us dependend on dpkg (and thus on Debian). PTXdist tries hard to run on any distribution, so I'm not happy with this.

Maybe Perl would be okay?

http://www.emdebian.or= g/trac/browser/current/target/dpkg/trunk/scripts/Dpkg/Version= .pm?rev=3D6998

Seems to be quite official, and the Dpkg::ErrorHandling and Dpkg::Gettext c= ould be easily removed.

=A0
What do you think about the bash implementat= ion found here:

Jon
--bcaec5215fb7b2b3e104afac377f-- --===============1034577715== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============1034577715==--