From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pz0-f44.google.com ([209.85.210.44]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1RYg9k-0005IA-Ha for ptxdist@pengutronix.de; Thu, 08 Dec 2011 16:45:10 +0100 Received: by dajz8 with SMTP id z8so2457470daj.31 for ; Thu, 08 Dec 2011 07:45:01 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20111208153738.GF11859@pengutronix.de> References: <3944866A166FC34A948C72DD5EDDCA2A1DC6A97C@HQ0SBS01.airtag.local> <20111208153738.GF11859@pengutronix.de> Date: Thu, 8 Dec 2011 10:45:00 -0500 Message-ID: From: Jon Ringle Subject: Re: [ptxdist] [PATCH] ptxdist-2011.01.0 bug in make ipkg-push 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="===============0339762433==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de --===============0339762433== Content-Type: multipart/alternative; boundary=f46d04190f101f20f104b3968d41 --f46d04190f101f20f104b3968d41 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Dec 8, 2011 at 10:37 AM, Michael Olbrich wrote: > Hi, > > so I accidentally pushed it before I could really review it... > I had some time today and I think it's at least better than before. > > On Tue, Nov 29, 2011 at 03:59:41PM +0000, Beno=EEt BURNICHON wrote: > > Now, ptxd_ipkg_rev_smaller does not enforce a revision to be 1.2.3-4 bu= t > > allows everything debian like. > > Well, not everything debian like, '~' is not handled correctly, right? > Maybe something like this: > ------------------------------------------------------------------------ > --- libptxdist.sh 2011-12-08 16:11:21.143970557 +0100 > +++ libptxdist.sh 2011-12-08 16:15:00.300421956 +0100 > @@ -741,13 +741,14 @@ > # > ptxd_ipkg_rev_decimal_convert() { > local ver=3D$* > - while echo $ver | grep -q '[^0-9.]' > + while echo $ver | grep -q '[^0-9.~]' > do > - local char=3D`echo -n $ver | sed 's/.*\([^0-9.]\).*/\1/'` > + local char=3D`echo -n $ver | sed 's/.*\([^0-9.~]\).*/\1/'= ` > local char_dec=3D`echo -n $char | od -b | head -n 1 | awk > '{print $2}'` > ver=3D`echo $ver | sed "s/$char/.$char_dec/g"` > done > > + ver=3D`echo $ver | sed -r "s/\.?~/.-1/g"` > ver=3D`echo $ver | sed 's/\.\./.0/g'` > > echo "$ver" > ------------------------------------------------------------------------ > > So I've been thinking about this whole version issue. The next step would > be all versions with '-'. Maybe we should always add '-1' as packages > revision. That would solve the problem for most of the packages is the > list, you posted some time ago. > What remains are 'broken' versions. For those few we could do, e.g.: > > MYSQL_VERSION :=3D 5.1.14-beta > MYSQL_XPKG_VERSION :=3D 5.1.14~beta > > Sounds like a good idea. Seems like the pkg_XPKG_VERSION could be autogenerated based on the pkg_VERSION so you wouldn't have to update all the package files. If there is no '-' character in the version then pkg_XPKG_VERSION would be equal to pkg_VERSION Jon --f46d04190f101f20f104b3968d41 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Dec 8, 2011 at 10:37 AM, Michael Olbrich= <m.olbric= h@pengutronix.de> wrote:
Hi,

so I accidentally pushed it before I could really review it...
I had some time today and I think it's at least better than before.

On Tue, Nov 29, 2011 at 03:59:41PM +0000, Beno=EEt BURNICHON wrote:
> Now, ptxd_ipkg_rev_smaller does not enforce a = revision to be 1.2.3-4 but
> allows everything debian like.

Well, not everything debian like, '~' is not handled correctl= y, right?
Maybe something like this:
------------------------------------------------------------------------ --- libptxdist.sh =A0 =A0 =A0 2011-12-08 16:11:21.143970557 +0100
+++ libptxdist.sh =A0 =A0 =A0 2011-12-08 16:15:00.300421956 +0100
@@ -741,13 +741,14 @@
=A0#
=A0ptxd_ipkg_rev_decimal_convert() {
=A0 =A0 =A0 =A0local ver=3D$*
- =A0 =A0 =A0 while echo $ver | grep -q '[^0-9.]'
+ =A0 =A0 =A0 while echo $ver | grep -q '[^0-9.~]'
=A0 =A0 =A0 =A0do
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 local char=3D`echo -n $ver | sed 's/.*\([= ^0-9.]\).*/\1/'`
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 local char=3D`echo -n $ver | sed 's/.*\([= ^0-9.~]\).*/\1/'`
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0local char_dec=3D`echo -n= $char | od -b | head -n 1 | awk '{print $2}'`
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ver=3D`echo $ver | = sed "s/$char/.$char_dec/g"`
=A0 =A0 =A0 =A0done

+ =A0 =A0 =A0 ver=3D`echo $ver | sed -r "s/\.?~/.-1/g"`
=A0 =A0 =A0 =A0ver=3D`echo $ver | sed 's/\.\./.0/g&#= 39;`

=A0 =A0 =A0 =A0echo "$ver"
------------------------------------------------------------------------
So I've been thinking about this whole version issue. The next step wou= ld
be all versions with '-'. Maybe we should always add '-1' a= s packages
revision. That would solve the problem for most of the packages is the
list, you posted some time ago.
What remains are 'broken' versions. For those few we could do, e.g.= :

MYSQL_VERSION =A0 =A0 =A0 =A0 =A0 :=3D 5.1.14-beta
MYSQL_XPKG_VERSION =A0 =A0 =A0:=3D 5.1.14~beta

Sounds like a good idea.
Seems like the pkg= _XPKG_VERSION could be autogenerated based on the pkg_VERSION so you wouldn= 't have to update all the package files. If there is no '-' cha= racter in the version then pkg_XPKG_VERSION would be equal to pkg_VERSION

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