Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Smart-Matching Version Dependencies

 
   Soft32 Home -> Linux -> Perl RSS
Next:  Processing of dose2_1.4.2-1_amd64.changes  
Author Message
Jonathan Yu

External


Since: Feb 07, 2009
Posts: 35



(Msg. 1) Posted: Tue Jul 21, 2009 3:21 pm
Post subject: Smart-Matching Version Dependencies
Archived from groups: linux>debian>maint>perl (more info?)

Hi:

I had planned to submit this to the debian-devel list, but I think it
should be discussed within our group first:

---

Currently according to policy there are five relationships that
package versions can have:
<< -- less than
< (deprecated) or <= -- less than or equal
= -- equal
> (deprecated) or >= -- greater than or equal
>> -- greater than

I would propose another dependency relationship, which would be denoted by:
~ or ~~ -- approximately equal

What is meant by approximate equality? Let me explain with an example...

Precedents and nice things this sort of syntax could help eliminate:
currently, the pkg-perl team maintains a module called Moose. It's an
object framework that requires another module, Class::MOP, to provide
metaobject programming features to Perl. They are closely related, and
generally whenever a release of either happens, both modules need to
be upgraded simultaneously. Class::MOP can be used on its own, but new
features in Moose often require something to be changed in Class::MOP,
so that new Moose module now requires the new Class::MOP.

All of this is a long-winded way to say that those modules basically
just need to be upgraded in step. We ensure that this happens by using
the following dependency relationships:

>From libmoose-perl [version 0.87] -- Depends: libclass-mop-perl (>= 0.89)
>From libclass-mop-perl [version 0.89] -- Breaks: libmoose-perl (<< 0.82+)

(As an aside, I think I actually screwed up the Breaks dependency on
libclass-mop-perl, as it probably breaks any version of Moose prior to
0.87. To my knowledge this hasn't screwed anything up yet, but such a
smart match feature could help in the future.)

Incidentally, the 0.82+ version number (note the trailing +) is to
cover the case where you've got Debian patch levels, like 0.82-2,
which would be considered newer than 0.82, yet is still broken.
Perhaps it would be useful to be able to say:

Depends: libclass-mop-perl (~ 0.89) -- which should mean "depends on
the upstream version 0.89 of libclass-mop-perl, but breaks on anything
older or newer." Then we could eliminate the second Breaks thing in
libclass-mop-perl.

Some problems I can think of:

1. I'm not sure how often this really happens upstream. This is really
the only Perl module I can think of that does this, so I suppose it's
a bit of a corner case (and thus not worth codifying into Policy or
dpkg)

2. Just because something strictly depends on libclass-mop-perl
/approx/ 0.89 doesn't mean it won't work with 0.90. Presumably this
additional checking is useful for Breaks.

On the other hand, I want to make sure that mistakes caused by
forgetting to update either Depends or Breaks doesn't totally mess
things up...


--
To UNSUBSCRIBE, email to debian-perl-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
SMART install nur aus spez. "SMART-Channel" - Wie kann man SMART auf der Kommandozeile dazu bringen nur einen bestimmten "Channel" zu verwenden? "Di...

smart 0.50 vs. smart 0.50rc1 - Ein Schritt zurück? - Hallo zusammen Nachdem ich gestern auf die 0.50final aktualisiert habe, hat mir smart heute fast ein Ei gelegt. Bei..

[MCA] fix bus matching - There's a bug in the MCA bus matching algorithm in that it promotes from signed short to int before comparing with the....

[gentoo-user] ip6tables, state matching - Since gentoo-sources-2.6.16-r3 it should be possible to use > > ip6tables -p tcp -m state --state RELATED,ESTABL...

matching winxp computer names with an IP - Is there a command that allows you to get the IP of a winxp computer on a linux. For example, assume that a winxp and....

[gentoo-user] Bash Pattern Matching Syntax - I want to list the files in a directory that end in ".jpg" irregardless of case. Thus after reading the bas...
       Soft32 Home -> Linux -> Perl All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]