Re: Debian version numbers and strcmp()

2009-01-23 Thread Don Armstrong
On Thu, 22 Jan 2009, Adeodato Simó wrote:
 I'd like to hear from members of this list what they think about the
 following issue: I just noticed that to determine whether two Debian
 versions are equal, one can't use strcmp() or similar, and must
 implement the full comparison algorithm. For example, 0.9 and 0.09
 are the same version according to Policy.

[...]

 Is there a reason for it to be this way? Is there a reason that
 would advise against changing it?

If version numbers aren't equal, there must be a greater than or less
than relationship between them. If you think that 0.9 and 0.09 should
not be equal, then a proposal for a rule to make the first greater
than or less than the other is needed. 

In my mind, these are no different than the difference between version
90 and version 090; they're not equal strings, but are certainly equal
version numbers (and equal numbers in general). Just like you can't
compare numbers for equality using strcmp, you can't compare versions
for equality using it either.


Don Armstrong

-- 
The state must declare the child to be the most precious treasure of
the people. As long as the government is perceived as working for the
benefit of the children, the people will happily endure almost any
curtailment of liberty and almost any deprivation.
 -- Adolf Hitler _Mein Kampf_ p403

http://www.donarmstrong.com  http://rzlab.ucr.edu


--
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Debian version numbers and strcmp()

2009-01-23 Thread Adeodato Simó
Thanks everybody for their responses. I'll learn to live with this
(small) unhappiness.

Cheers,

-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
The first step on the road to wisdom is the admission of ignorance. The
second step is realizing that you don't have to blab it to the world.


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Debian version numbers and strcmp()

2009-01-23 Thread Guillem Jover
Hi!

On Thu, 2009-01-22 at 15:19:40 +0100, Adeodato Simó wrote:
 I'd like to hear from members of this list what they think about the
 following issue: I just noticed that to determine whether two Debian
 versions are equal, one can't use strcmp() or similar, and must
 implement the full comparison algorithm. For example, 0.9 and 0.09 are
 the same version according to Policy.

I think that the correct solution to your problem is not to change the
comparison algorithm, but to have available implementations of it or
bindings in all needed programming languages, so that it does not need
to be reimplemented every time. AFAIK we have right now:

 * shell (dpkg --compare-versions)
 * C++ (libapt)
 * perl (libapt-pkg-perl, dpkg-dev [not public yet])
 * python (python-apt)
 * ruby ?

There's probably more I'm missing, but the most ovbious one is the C
implementation. But exposing a libdpkg with it is high on my TODO for
dpkg 1.15.x.

 I'm tempted to say this is rather unfortunate: I always believed our
 version numbers to be comparable for *equality* using standard tools,
 and that the Policy algorithm was there just to sort different version
 strings. I think this is a reasonable expectation, too. (I realize
 Policy talks about comparison.)

I've always thought it was a feature!

regards,
guillem


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Bits from the Policy Team, call for volunteers

2009-01-23 Thread Russ Allbery
Bill Allombert bill.allomb...@math.u-bordeaux1.fr writes:

 I would like to be a Policy delegate.

Hi Bill,

I think that sounds great.

I didn't have a lot of specific ideas in mind as to how to go about adding
people.  I think the best thing to do may be for you to just dive in,
given that most of what the team does doesn't require any special
privileges, and we can update the delegation and the dbnpolicy group (for
writing to the Git repository) as we go.  The basic details of how the
current Policy process works are laid out on the wiki at:

http://wiki.debian.org/Teams/Policy

which you're probably already familiar with.

Most of the work is in the BTS, and most of that is tackling an open
issue, trying to figure out what to do, proposing wording, counting
seconds, incorporating it, and grabbing another issue to repeat.  Of
course, if you have any ideas on how to do things differently, I'd love to
hear them.

-- 
Russ Allbery (r...@debian.org)   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org