[pacman-dev] conflict and provision versions
Xavier
shiningxc at gmail.com
Mon Nov 19 12:55:53 EST 2007
On Mon, Nov 19, 2007 at 01:16:10PM +0100, Nagy Gabor wrote:
> 1. As I told in the subject: conflict-version is undocumented (what's more, the
> documentation says you cannot use version numbers...). So we should fix this:
> a.) conflict syntax is the same as depends syntax
> b.) 'foo' conflict covers exactly the same set of packages as 'foo' depends (so
> for example (versioned ;-) provisions are also checked).
>
Attaching a little patch.
> 2. Back to versioned provisions:
> My concept of versioned provision was: alternative (pkgname, pkgver) pairs
> [which means this package is equivalent with _one_ certain package], where
> pkgver="" is also allowed [which means in my concept that pkgver was "lost", NOT
> any; this decision is crutial here, one of the must important changes(*)]<- this
> is the clearest and easiest-to-implement solution imho (you needn't modify
> alpm_vercmp).
> So for example kernelck-2.6.22-1 provides kernel-2.6.22-1 and so on.
>
> Vmiklos suggested on irc, that I should use depends-like syntax; such as
> provides 'foo>=1.0' but I didn't like that because this can lead to decision
> problems. What do you think? If you also prefer this (Xavier, you mentioned
> dependencies here, too), then my compromise: change the 'provname provver'
> syntax to 'provname=provver' (this is just a s/' '/'='/ in my patch), and later
> you can implement more general provides syntax without breaking the current "style".
>
> (*)So I ask you again (you should make a decision):
> What should versionless provision mean?
> a.) this provision does NOT satisfy 'provision>=2.0-1' (I've chosen this in my
> patch)
> b.) 'no provver' means 'ANY provver' (this is also acceptable, but imho
> 'provision>=2.0-1' means that we cannot accept "any" provision, just the "new" ones)
> c.) current method: use pkgver (imho forget it ;-)
>
I found the current behavior a little confusing at first, but actually, it's
alright.
Suppose you have a package which depends on provision>=2.0-2 , and let's see
what a package needs to provide for satisfying it :
* 'provision' -> NO
* 'provision 2.0' -> OK
* 'provision 2.0-1' -> NO
* 'provision 2.0-2' -> OK
So any 2.0-x dep will be satisfied by provision 2.0 .
Now, if the dependency is provision>=2.0 :
* 'provision' -> NO
* 'provision 2.0' -> OK
* 'provision 2.0-1' -> OK
* 'provision 2.0-2' -> OK
So the 2.0 dep will be satified by any 2.0-x
-------------- next part --------------
>From b0c8ded49f2f608b59cc5f84efa985322278b010 Mon Sep 17 00:00:00 2001
From: Chantry Xavier <shiningxc at gmail.com>
Date: Mon, 19 Nov 2007 18:23:04 +0100
Subject: [PATCH] Update PKGBUILD manpage with versioned conflicts.
As the b96922679e4ed14aa687bf194b766d82a1d10577 commit showed with two
pactests (which were renamed to depconflict110/111), versioned conflicts are
now possible.
Signed-off-by: Chantry Xavier <shiningxc at gmail.com>
---
doc/PKGBUILD.5.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index 6950041..ec7ea91 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -126,7 +126,7 @@ Options and Directives
*conflicts (array)*::
An array of packages that will conflict with this package (i.e. they
cannot both be installed at the same time). This directive follows the
- same format as depends, except you cannot specify versions.
+ same format as depends. Versioned conflicts are also supported.
*provides (array)*::
An array of ``virtual provisions'' that this package provides. This allows
--
1.5.3.6
More information about the pacman-dev
mailing list