public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Gustavo Barbieri <barbieri@gmail.com>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] Current portage well designed, but badly used
Date: Sun, 28 Nov 2004 22:39:23 -0200	[thread overview]
Message-ID: <9ef20ef304112816395de14257@mail.gmail.com> (raw)
In-Reply-To: <9ef20ef304112809223e4e4c70@mail.gmail.com>

On Sun, 28 Nov 2004 15:22:44 -0200, Gustavo Barbieri <barbieri@gmail.com> wrote:
> On Sun, 28 Nov 2004 05:44:50 +0000 (GMT), Ed Grimm
> <paranoid@gentoo.evolution.tgape.org> wrote:
> > 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.
> 
> I did a PackageVersion class that parses these sections using a
> regular expression following the package naming policy. I don't send
> the code since I'll need to recode it, my XFS lost many data after a
> power failure :( But I have the bytecode if you want to test it or
> help me to get the .py back.

Okay, I hacked a free version of  decompyle from BSD to support python
2.3 bytecode and recovered my file.

If you want to check it out:
http://ltc08.ic.unicamp.br/~gustavo/packagemanager.tar.bz2, the file
of interest is lib/packagemanager/packagemanagementsystem.py, there
are some classes, he PackageVersion is of interest, please look at it.
(if you don't want to get the package:
http://ltc08.ic.unicamp.br/~gustavo/packagemanagementsystem.py)


-- 
Gustavo Sverzut Barbieri
---------------------------------------
Computer Engineer 2001 - UNICAMP
GPSL - Grupo Pro Software Livre
Cell..: +55 (19) 9165 8010
Jabber: gsbarbieri@jabber.org
  ICQ#: 17249123
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net

--
gentoo-portage-dev@gentoo.org mailing list


  reply	other threads:[~2004-11-29  0:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-27 23:10 [gentoo-portage-dev] Current portage well designed, but badly used Gustavo Barbieri
2004-11-27 23:48 ` Michael Tindal
2004-11-28 17:08   ` Gustavo Barbieri
2004-11-28 17:31     ` Andrew Gaffney
2004-11-28 17:56       ` Gustavo Barbieri
2004-11-30 14:22     ` Brian Harring
2004-11-30 14:53       ` Jason Stubbs
2004-12-01  4:13         ` Gustavo Barbieri
2004-12-01  8:41           ` Brian Harring
2004-12-01 13:41             ` Gustavo Barbieri
2004-12-01  3:55       ` Gustavo Barbieri
2004-12-01  9:37         ` Gregorio Guidi
2004-12-01 10:59           ` Brian Harring
2004-12-01 11:25             ` Gregorio Guidi
2004-12-01 12:08               ` Brian Harring
2004-12-01 13:25                 ` Gregorio Guidi
2004-12-01 13:38                   ` Jason Stubbs
2004-11-28  3:41 ` Luke-Jr
2004-11-28 17:19   ` Gustavo Barbieri
2004-11-28  5:44 ` Ed Grimm
2004-11-28  6:18   ` John Nilsson
2004-11-28 15:58     ` Allen Parker
2004-11-28 17:22   ` Gustavo Barbieri
2004-11-29  0:39     ` Gustavo Barbieri [this message]
2004-11-28 19:37 ` Paul de Vrieze

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=9ef20ef304112816395de14257@mail.gmail.com \
    --to=barbieri@gmail.com \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /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