From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6410 invoked from network); 28 Nov 2004 05:40:10 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 28 Nov 2004 05:40:10 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.41) id 1CYHn7-0002gQ-SZ for arch-gentoo-portage-dev@lists.gentoo.org; Sun, 28 Nov 2004 05:40:09 +0000 Received: (qmail 2130 invoked by uid 89); 28 Nov 2004 05:40:08 +0000 Mailing-List: contact gentoo-portage-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail Reply-To: gentoo-portage-dev@lists.gentoo.org X-BeenThere: gentoo-portage-dev@gentoo.org Received: (qmail 1559 invoked from network); 28 Nov 2004 05:40:08 +0000 Date: Sun, 28 Nov 2004 05:44:50 +0000 (GMT) From: Ed Grimm To: gentoo-portage-dev@lists.gentoo.org, Gustavo Barbieri In-Reply-To: <9ef20ef3041127151046107fb5@mail.gmail.com> Message-ID: References: <9ef20ef3041127151046107fb5@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [gentoo-portage-dev] Current portage well designed, but badly used X-Archives-Salt: 61028140-81d2-4da4-901e-3570e423b4eb X-Archives-Hash: fc049db854e07a64f93fedbcbec2b9c3 On Sat, 27 Nov 2004, Gustavo Barbieri wrote: > Some packages use numbering version padded with zero, that's good to > list with shell functions, but it's bad because you can't change them > to numbers and them back to string. For example: > mail-mta/nullmailer-1.00_rc7-r4. If you Convert it to integers, it > becomes 1.0 and you can't map back to the ebuild. It's worse than that. They're not always integers. It's safest to treat version numbers as strings as much as possible; when one needs to break them into integer portions, do this for comparison only, and save the original. Finally, a number of packages would require that you provide a mechanism for determining all version numbers that aren't strictly numeric. Openssl, with its \d+.\d+.\d+[a-z] versions is easy. hddtemp, with its alpha/beta tags, is doable but tedious. There may be others which are more problematic. I haven't seen Gentoo using them, but many kernels are distributed with -[a-z][a-z]\d+ versions, which indicate which alternate maintainer managed the additional patches beyond the standard kernel version - which is newer, -mm5 or -bk15? The world may never know. (It's only determinate for specific kernel versions, and frequently it's an apples and lemonade comparison, as they don't address the same issues.) Ed -- gentoo-portage-dev@gentoo.org mailing list