[pacman-dev] [PATCH] PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods added
From c0d82c952dd7fc59cdc478898025a21d9ecf03d6 Mon Sep 17 00:00:00 2001
From: Nagy Gabor
On Dec 18, 2007 7:26 AM, Nagy Gabor
From c0d82c952dd7fc59cdc478898025a21d9ecf03d6 Mon Sep 17 00:00:00 2001 From: Nagy Gabor
Date: Tue, 18 Dec 2007 14:24:44 +0100 Subject: [PATCH] PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods added You can use foo<2.0 and foo>2.0 as depend add046.py and add047.py pactests were added to check this
Signed-off-by: Nagy Gabor
Seems fine to me. Aaron, any objections? -Dan
On Tue, Dec 18, 2007 at 09:57:53AM -0600, Dan McGee wrote:
On Dec 18, 2007 7:26 AM, Nagy Gabor
wrote: From c0d82c952dd7fc59cdc478898025a21d9ecf03d6 Mon Sep 17 00:00:00 2001 From: Nagy Gabor
Date: Tue, 18 Dec 2007 14:24:44 +0100 Subject: [PATCH] PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods added You can use foo<2.0 and foo>2.0 as depend add046.py and add047.py pactests were added to check this
Signed-off-by: Nagy Gabor
Seems fine to me. Aaron, any objections?
I'm not sure you missed this mail, but just in case : http://www.archlinux.org/pipermail/pacman-dev/2007-December/010527.html I have to side with Aaron here, actually, I'm just going to quote what he said : "That said, if someone wants to add in support for > and < comparators, I wouldn't complain. It just sounds like "feature creep" to me - it's solving a problem no one encounters on a day to day basis." That is, I don't find it very useful either, but since it doesn't add much code, it's not a big deal.
On Dec 18, 2007 10:08 AM, Xavier
On Tue, Dec 18, 2007 at 09:57:53AM -0600, Dan McGee wrote:
On Dec 18, 2007 7:26 AM, Nagy Gabor
wrote: From c0d82c952dd7fc59cdc478898025a21d9ecf03d6 Mon Sep 17 00:00:00 2001 From: Nagy Gabor
Date: Tue, 18 Dec 2007 14:24:44 +0100 Subject: [PATCH] PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods added You can use foo<2.0 and foo>2.0 as depend add046.py and add047.py pactests were added to check this
Signed-off-by: Nagy Gabor
Seems fine to me. Aaron, any objections?
I'm not sure you missed this mail, but just in case : http://www.archlinux.org/pipermail/pacman-dev/2007-December/010527.html
I have to side with Aaron here, actually, I'm just going to quote what he said : "That said, if someone wants to add in support for > and < comparators, I wouldn't complain. It just sounds like "feature creep" to me - it's solving a problem no one encounters on a day to day basis."
That is, I don't find it very useful either, but since it doesn't add much code, it's not a big deal.
Yeah, I saw the email. But it was followed through with a light and straightforward patch, so that is why I do not object to merging this (although I too do not see a wide range of use for this). -Dan
On Dec 18, 2007 10:36 AM, Dan McGee
On Dec 18, 2007 10:08 AM, Xavier
wrote: On Tue, Dec 18, 2007 at 09:57:53AM -0600, Dan McGee wrote:
On Dec 18, 2007 7:26 AM, Nagy Gabor
wrote: From c0d82c952dd7fc59cdc478898025a21d9ecf03d6 Mon Sep 17 00:00:00 2001 From: Nagy Gabor
Date: Tue, 18 Dec 2007 14:24:44 +0100 Subject: [PATCH] PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods added You can use foo<2.0 and foo>2.0 as depend add046.py and add047.py pactests were added to check this
Signed-off-by: Nagy Gabor
Seems fine to me. Aaron, any objections?
I'm not sure you missed this mail, but just in case : http://www.archlinux.org/pipermail/pacman-dev/2007-December/010527.html
I have to side with Aaron here, actually, I'm just going to quote what he said : "That said, if someone wants to add in support for > and < comparators, I wouldn't complain. It just sounds like "feature creep" to me - it's solving a problem no one encounters on a day to day basis."
That is, I don't find it very useful either, but since it doesn't add much code, it's not a big deal.
Yeah, I saw the email. But it was followed through with a light and straightforward patch, so that is why I do not object to merging this (although I too do not see a wide range of use for this).
Yup, Nagy kicked ass here. This is great. Like I said, it MAY be a bit of feature creep, but the code is here and it's not all that much. /me gives a thumbs up
I'm not sure you missed this mail, but just in case : http://www.archlinux.org/pipermail/pacman-dev/2007-December/010527.html
I have to side with Aaron here, actually, I'm just going to quote what he said : "That said, if someone wants to add in support for > and < comparators, I wouldn't complain. It just sounds like "feature creep" to me - it's solving a problem no one encounters on a day to day basis."
That is, I don't find it very useful either, but since it doesn't add much code, it's not a big deal.
Well, I agree, that this will be rarely used (mainly >). So if you can show me a clean way (not kernel26 provision) to say that "foo depends on kernel-2.6.x" I will revert this immediately (this was the only reason for implementing) Bye
On Dec 19, 2007 1:24 AM, Nagy Gabor
Well, I agree, that this will be rarely used (mainly >). So if you can show me a clean way (not kernel26 provision) to say that "foo depends on kernel-2.6.x" I will revert this immediately (this was the only reason for implementing)
I thought our version compartors already worked for this case? That is, for foo-1.2.3, doing a depends=(foo>=1.2) will work just fine
On Dec 19, 2007 11:04 AM, Aaron Griffin
On Dec 19, 2007 1:24 AM, Nagy Gabor
wrote: Well, I agree, that this will be rarely used (mainly >). So if you can show me a clean way (not kernel26 provision) to say that "foo depends on kernel-2.6.x" I will revert this immediately (this was the only reason for implementing)
I thought our version compartors already worked for this case? That is, for foo-1.2.3, doing a depends=(foo>=1.2) will work just fine
I think what he's getting at is he wants a dependency on kernel26 version 2.6.x for any x. Saying depends=(kernel26>=2.6) will match kernel26 for any version >= 2.6, which is not the same thing, because it will match versions 2.7, 2.8, 3.0, and 1000.
On Dec 19, 2007 10:11 AM, Travis Willard
On Dec 19, 2007 11:04 AM, Aaron Griffin
wrote: On Dec 19, 2007 1:24 AM, Nagy Gabor
wrote: Well, I agree, that this will be rarely used (mainly >). So if you can show me a clean way (not kernel26 provision) to say that "foo depends on kernel-2.6.x" I will revert this immediately (this was the only reason for implementing)
I thought our version compartors already worked for this case? That is, for foo-1.2.3, doing a depends=(foo>=1.2) will work just fine
I think what he's getting at is he wants a dependency on kernel26 version 2.6.x for any x. Saying depends=(kernel26>=2.6) will match kernel26 for any version >= 2.6, which is not the same thing, because it will match versions 2.7, 2.8, 3.0, and 1000.
Yeah, and I was under the impression that >=2.6.20 would match any of 2.6.20, 2.6.20.1, 2.6.20.7827233, 2.6.20-45, etc I can't verify right now, but I thought 2.6.20.x was always > 2.6.20 in libalpm
On Dec 19, 2007 11:39 AM, Aaron Griffin
On Dec 19, 2007 10:11 AM, Travis Willard
wrote: I think what he's getting at is he wants a dependency on kernel26 version 2.6.x for any x. Saying depends=(kernel26>=2.6) will match kernel26 for any version >= 2.6, which is not the same thing, because it will match versions 2.7, 2.8, 3.0, and 1000.
Yeah, and I was under the impression that >=2.6.20 would match any of 2.6.20, 2.6.20.1, 2.6.20.7827233, 2.6.20-45, etc
Lol - gmail highlighted 2.6.20.1 as a http:// link to an IP address. Oh, gmail. Yes, >=2.6.20 will match those, but it will match _MORE_ than those, which is the problem (in my mind) To match specifically 2.6.20.x, you need two entries in the depends: kernel26>=2.6.20 and kernel26<2.6.21 -- any module we build will not be compatible, for example, with the next-higher 2.6.x release, and if we can explicitly say which kernels are allowed in the module's dependencies, I think that's even better than an open-ended >=2.6.20 dep.
I can't verify right now, but I thought 2.6.20.x was always > 2.6.20 in libalpm
On Dec 19, 2007 10:48 AM, Travis Willard
On Dec 19, 2007 11:39 AM, Aaron Griffin
wrote: On Dec 19, 2007 10:11 AM, Travis Willard
wrote: I think what he's getting at is he wants a dependency on kernel26 version 2.6.x for any x. Saying depends=(kernel26>=2.6) will match kernel26 for any version >= 2.6, which is not the same thing, because it will match versions 2.7, 2.8, 3.0, and 1000.
Yeah, and I was under the impression that >=2.6.20 would match any of 2.6.20, 2.6.20.1, 2.6.20.7827233, 2.6.20-45, etc
Lol - gmail highlighted 2.6.20.1 as a http:// link to an IP address. Oh, gmail.
Yes, >=2.6.20 will match those, but it will match _MORE_ than those, which is the problem (in my mind)
To match specifically 2.6.20.x, you need two entries in the depends: kernel26>=2.6.20 and kernel26<2.6.21 -- any module we build will not be compatible, for example, with the next-higher 2.6.x release, and if we can explicitly say which kernels are allowed in the module's dependencies, I think that's even better than an open-ended >=2.6.20 dep.
Aha, this now makes a lot of sense. Do we have any pactests to ensure multiple depends on the same package will work? I think we should make some if we don't have them (one that is satisfied, one that is not). Something testing what would happen if you wanted to upgrade the kernel but could not upgrade because module deps were not satisfied would be cool. -Dan
On Dec 19, 2007 10:48 AM, Travis Willard
wrote: On Dec 19, 2007 11:39 AM, Aaron Griffin
wrote: On Dec 19, 2007 10:11 AM, Travis Willard
wrote: I think what he's getting at is he wants a dependency on kernel26 version 2.6.x for any x. Saying depends=(kernel26>=2.6) will match kernel26 for any version >= 2.6, which is not the same thing, because it will match versions 2.7, 2.8, 3.0, and 1000.
Yeah, and I was under the impression that >=2.6.20 would match any of 2.6.20, 2.6.20.1, 2.6.20.7827233, 2.6.20-45, etc
Lol - gmail highlighted 2.6.20.1 as a http:// link to an IP address. Oh, gmail.
Yes, >=2.6.20 will match those, but it will match _MORE_ than those, which is the problem (in my mind)
To match specifically 2.6.20.x, you need two entries in the depends: kernel26>=2.6.20 and kernel26<2.6.21 -- any module we build will not be compatible, for example, with the next-higher 2.6.x release, and if we can explicitly say which kernels are allowed in the module's dependencies, I think that's even better than an open-ended >=2.6.20 dep.
Aha, this now makes a lot of sense. Do we have any pactests to ensure multiple depends on the same package will work? I think we should make some if we don't have them (one that is satisfied, one that is not). Something testing what would happen if you wanted to upgrade the kernel but could not upgrade because module deps were not satisfied would be cool.
-Dan
Imho we don't need these pactests, because kernel26>=2.6.20 and kernel26<2.6.21 are two different dependencies (every line in %DEPENDS% is splited then checked with alpm_depcmp), even you can list the _same_ dependency 3 times, this is treated as 3 different dependencies everywhere in the code. I mention a really odd situation: You have a package with foo<2.0 AND foo>=1.0 dependency. If there is a foo 0.1-1 package installed (this satisfies foo<2.0) and a foo 3.0-1 (provision)package installed, both of our dependencies are satisfied but this is not what we wanted. <- I simply ignore this case, because this is really far from real life, but I had to mention this to be "precise". Bye
On Dec 19, 2007 11:58 AM, Nagy Gabor
On Dec 19, 2007 10:48 AM, Travis Willard
wrote: On Dec 19, 2007 11:39 AM, Aaron Griffin
wrote: On Dec 19, 2007 10:11 AM, Travis Willard
wrote: I think what he's getting at is he wants a dependency on kernel26 version 2.6.x for any x. Saying depends=(kernel26>=2.6) will match kernel26 for any version >= 2.6, which is not the same thing, because it will match versions 2.7, 2.8, 3.0, and 1000.
Yeah, and I was under the impression that >=2.6.20 would match any of 2.6.20, 2.6.20.1, 2.6.20.7827233, 2.6.20-45, etc
Lol - gmail highlighted 2.6.20.1 as a http:// link to an IP address. Oh, gmail.
Yes, >=2.6.20 will match those, but it will match _MORE_ than those, which is the problem (in my mind)
To match specifically 2.6.20.x, you need two entries in the depends: kernel26>=2.6.20 and kernel26<2.6.21 -- any module we build will not be compatible, for example, with the next-higher 2.6.x release, and if we can explicitly say which kernels are allowed in the module's dependencies, I think that's even better than an open-ended >=2.6.20 dep.
Aha, this now makes a lot of sense. Do we have any pactests to ensure multiple depends on the same package will work? I think we should make some if we don't have them (one that is satisfied, one that is not). Something testing what would happen if you wanted to upgrade the kernel but could not upgrade because module deps were not satisfied would be cool.
-Dan
Imho we don't need these pactests, because kernel26>=2.6.20 and kernel26<2.6.21 are two different dependencies (every line in %DEPENDS% is splited then checked with alpm_depcmp), even you can list the _same_ dependency 3 times, this is treated as 3 different dependencies everywhere in the code.
Yes, I am aware of this, but tests should not be written based on knowledge of what is in the black box- the idea is that if we change implementation, we still test what was the expected behavior and ensure it still stands. We need them not because they are currently failing, but because they will catch possible slipups in the future.
I mention a really odd situation: You have a package with foo<2.0 AND foo>=1.0 dependency. If there is a foo 0.1-1 package installed (this satisfies foo<2.0) and a foo 3.0-1 (provision)package installed, both of our dependencies are satisfied but this is not what we wanted. <- I simply ignore this case, because this is really far from real life, but I had to mention this to be "precise".
Ha, this is quite hard to trigger, so we can punt on this for now. :) Glad you mentioned it though. -Dan
participants (5)
-
Aaron Griffin
-
Dan McGee
-
Nagy Gabor
-
Travis Willard
-
Xavier