public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Depending on a range of slots
@ 2015-11-02 17:48 Michael Orlitzky
  2015-11-02 18:00 ` Kristian Fiskerstrand
  2015-11-02 19:21 ` Ciaran McCreesh
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Orlitzky @ 2015-11-02 17:48 UTC (permalink / raw
  To: gentoo-dev

In the dev-lang/php ebuilds, we currently have:

 DEPEND="... berkdb? ( =sys-libs/db-4* ) ..."

PHP will actually accept any 4.x or 5.x version of db; the ./configure
flag is poorly-named:

  https://bugs.gentoo.org/show_bug.cgi?id=521222

Now, we also get repoman warnings for not specifying a slot on that
dependency. But sys-libs/db has a bunch of 4.x and 5.x slots:

  * sys-libs/db
     Available versions:
     (1)    1.85-r3
     (3)    3.2.9_p2
     (4.2)  4.2.52_p5-r1
     (4.3)  4.3.29_p1-r1
     (4.4)  ~4.4.20_p4-r1
     (4.5)  4.5.20_p2-r1
     (4.6)  4.6.21_p4
     (4.7)  4.7.25_p4
     (4.8)  4.8.30-r1 4.8.30-r2
     (5.1)  ~5.1.29-r1
     (5.3)  ~5.3.28-r2
     (6.0)  ~6.0.30-r1 ~6.0.35
     (6.1)  [M]~6.1.26

Is there a way to say "give me any 4.x or 5.x slot"?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 17:48 [gentoo-dev] Depending on a range of slots Michael Orlitzky
@ 2015-11-02 18:00 ` Kristian Fiskerstrand
  2015-11-02 19:04   ` Michael Orlitzky
  2015-11-02 19:21 ` Ciaran McCreesh
  1 sibling, 1 reply; 11+ messages in thread
From: Kristian Fiskerstrand @ 2015-11-02 18:00 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

On 11/02/2015 06:48 PM, Michael Orlitzky wrote:
> In the dev-lang/php ebuilds, we currently have:
> 

..

> 
> Is there a way to say "give me any 4.x or 5.x slot"?
> 

Is that necessarily a good idea? Given that the database formats are
not compatible between versions without cleaning out the BDB
environment files etc it seems like a source of conflict?

Granted I'm not sure how this is used primarily in PHP, but for
net-misc/sks I just stick to a known good stable slot (in that case
4.8) and if switching that in the future expecting a news item or at
least an elog pointing to the upstream UPGRADING instructions[0]

References:
[0]
https://bitbucket.org/skskeyserver/sks-keyserver/src/867fbbe9720c269761472a64f047d416021a4e4a/UPGRADING?at=default&fileviewer=file-view-default

-- 
Kristian Fiskerstrand
Public PGP key 0xE3EDFAE3 at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 18:00 ` Kristian Fiskerstrand
@ 2015-11-02 19:04   ` Michael Orlitzky
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Orlitzky @ 2015-11-02 19:04 UTC (permalink / raw
  To: gentoo-dev

On 11/02/2015 01:00 PM, Kristian Fiskerstrand wrote:
> On 11/02/2015 06:48 PM, Michael Orlitzky wrote:
>> In the dev-lang/php ebuilds, we currently have:
>>
>> Is there a way to say "give me any 4.x or 5.x slot"?
>>
> 
> Is that necessarily a good idea? Given that the database formats are
> not compatible between versions without cleaning out the BDB
> environment files etc it seems like a source of conflict?
> 

It depends on what the user needs it for. If somebody gives me a BDB
file and wants me to create a webpage listing its contents, then I need
to use whatever version of BDB the file's creator used.

If I'm writing a new application and just need to store some stuff, it
doesn't matter which version I have (so long as it doesn't change).

Using BDB with PHP is pretty rare from what I gather, but maybe somebody
has a crazy use case for it in Gentoo. The current dependency says "any
4.x version" so the least intrusive change to the ebuild would be to
retain that behavior or to extend it to allow any 4.x or 5.x version.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 17:48 [gentoo-dev] Depending on a range of slots Michael Orlitzky
  2015-11-02 18:00 ` Kristian Fiskerstrand
@ 2015-11-02 19:21 ` Ciaran McCreesh
  2015-11-02 19:33   ` Michael Orlitzky
  1 sibling, 1 reply; 11+ messages in thread
From: Ciaran McCreesh @ 2015-11-02 19:21 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

On Mon, 2 Nov 2015 12:48:29 -0500
Michael Orlitzky <mjo@gentoo.org> wrote:
> Is there a way to say "give me any 4.x or 5.x slot"?

No. Slots are meaningless strings and do not support any comparison
except equality.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 19:21 ` Ciaran McCreesh
@ 2015-11-02 19:33   ` Michael Orlitzky
  2015-11-02 19:48     ` Ciaran McCreesh
  2015-11-02 20:05     ` Michał Górny
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Orlitzky @ 2015-11-02 19:33 UTC (permalink / raw
  To: gentoo-dev

On 11/02/2015 02:21 PM, Ciaran McCreesh wrote:
> On Mon, 2 Nov 2015 12:48:29 -0500
> Michael Orlitzky <mjo@gentoo.org> wrote:
>> Is there a way to say "give me any 4.x or 5.x slot"?
> 
> No. Slots are meaningless strings and do not support any comparison
> except equality.
> 

Followup question, which of these is less dumb?

Option 1: berkdb? ( >=sys-libs/db-4:*  <sys-libs/db-6:* )

Option 2: berkdb? ( || ( sys-libs/db:4.2 ... sys-libs/db:5.3 ) )



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 19:33   ` Michael Orlitzky
@ 2015-11-02 19:48     ` Ciaran McCreesh
  2015-11-02 20:51       ` Michael Orlitzky
  2015-11-02 20:05     ` Michał Górny
  1 sibling, 1 reply; 11+ messages in thread
From: Ciaran McCreesh @ 2015-11-02 19:48 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

On Mon, 2 Nov 2015 14:33:57 -0500
Michael Orlitzky <mjo@gentoo.org> wrote:
> Followup question, which of these is less dumb?
> 
> Option 1: berkdb? ( >=sys-libs/db-4:*  <sys-libs/db-6:* )

This doesn't mean what you think it means. A user who has db-3 and db-7
installed satisfies that dependency.

> Option 2: berkdb? ( || ( sys-libs/db:4.2 ... sys-libs/db:5.3 ) )

Best option goes leftmost in ||.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 19:33   ` Michael Orlitzky
  2015-11-02 19:48     ` Ciaran McCreesh
@ 2015-11-02 20:05     ` Michał Górny
  1 sibling, 0 replies; 11+ messages in thread
From: Michał Górny @ 2015-11-02 20:05 UTC (permalink / raw
  To: Michael Orlitzky; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

On Mon, 2 Nov 2015 14:33:57 -0500
Michael Orlitzky <mjo@gentoo.org> wrote:

> On 11/02/2015 02:21 PM, Ciaran McCreesh wrote:
> > On Mon, 2 Nov 2015 12:48:29 -0500
> > Michael Orlitzky <mjo@gentoo.org> wrote:  
> >> Is there a way to say "give me any 4.x or 5.x slot"?  
> > 
> > No. Slots are meaningless strings and do not support any comparison
> > except equality.
> >   
> 
> Followup question, which of these is less dumb?
> 
> Option 1: berkdb? ( >=sys-libs/db-4:*  <sys-libs/db-6:* )

This one can install two berkdb versions...

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 19:48     ` Ciaran McCreesh
@ 2015-11-02 20:51       ` Michael Orlitzky
  2015-11-02 21:01         ` hasufell
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Orlitzky @ 2015-11-02 20:51 UTC (permalink / raw
  To: gentoo-dev

On 11/02/2015 02:48 PM, Ciaran McCreesh wrote:
> On Mon, 2 Nov 2015 14:33:57 -0500
> Michael Orlitzky <mjo@gentoo.org> wrote:
>> Followup question, which of these is less dumb?
>>
>> Option 1: berkdb? ( >=sys-libs/db-4:*  <sys-libs/db-6:* )
> 
> This doesn't mean what you think it means. A user who has db-3 and db-7
> installed satisfies that dependency.
> 

Indeed, thanks.


>> Option 2: berkdb? ( || ( sys-libs/db:4.2 ... sys-libs/db:5.3 ) )
> 
> Best option goes leftmost in ||.
> 

Got it, I'll reverse them.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 20:51       ` Michael Orlitzky
@ 2015-11-02 21:01         ` hasufell
  2015-11-02 21:08           ` Ciaran McCreesh
  2015-11-02 23:31           ` Chí-Thanh Christopher Nguyễn
  0 siblings, 2 replies; 11+ messages in thread
From: hasufell @ 2015-11-02 21:01 UTC (permalink / raw
  To: gentoo-dev

On 11/02/2015 09:51 PM, Michael Orlitzky wrote:
> On 11/02/2015 02:48 PM, Ciaran McCreesh wrote:
>> On Mon, 2 Nov 2015 14:33:57 -0500
>> Michael Orlitzky <mjo@gentoo.org> wrote:
>>> Followup question, which of these is less dumb?
>>>
>>> Option 1: berkdb? ( >=sys-libs/db-4:*  <sys-libs/db-6:* )
>>
>> This doesn't mean what you think it means. A user who has db-3 and db-7
>> installed satisfies that dependency.
>>
> 
> Indeed, thanks.
> 

That's an interesting pitfall. I am pretty sure we have this kind of
syntax a lot in the tree. Might make sense to document it.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 21:01         ` hasufell
@ 2015-11-02 21:08           ` Ciaran McCreesh
  2015-11-02 23:31           ` Chí-Thanh Christopher Nguyễn
  1 sibling, 0 replies; 11+ messages in thread
From: Ciaran McCreesh @ 2015-11-02 21:08 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

On Mon, 2 Nov 2015 22:01:05 +0100
hasufell <hasufell@gentoo.org> wrote:
> That's an interesting pitfall. I am pretty sure we have this kind of
> syntax a lot in the tree. Might make sense to document it.

Would make more sense just to implement version ranges in full
generality, since developers seem to insist upon using < dependencies
anyway...

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Depending on a range of slots
  2015-11-02 21:01         ` hasufell
  2015-11-02 21:08           ` Ciaran McCreesh
@ 2015-11-02 23:31           ` Chí-Thanh Christopher Nguyễn
  1 sibling, 0 replies; 11+ messages in thread
From: Chí-Thanh Christopher Nguyễn @ 2015-11-02 23:31 UTC (permalink / raw
  To: gentoo-dev

hasufell schrieb:
>>>> Followup question, which of these is less dumb?
>>>>
>>>> Option 1: berkdb? ( >=sys-libs/db-4:*  <sys-libs/db-6:* )
>>>
>>> This doesn't mean what you think it means. A user who has db-3 and db-7
>>> installed satisfies that dependency.
>>>
>>
>> Indeed, thanks.
>>
> 
> That's an interesting pitfall. I am pretty sure we have this kind of
> syntax a lot in the tree. Might make sense to document it.

It's ok and works as expected as long as you depend on only one slot.


Best regards,
Chí-Thanh Christopher Nguyễn



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-11-02 23:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02 17:48 [gentoo-dev] Depending on a range of slots Michael Orlitzky
2015-11-02 18:00 ` Kristian Fiskerstrand
2015-11-02 19:04   ` Michael Orlitzky
2015-11-02 19:21 ` Ciaran McCreesh
2015-11-02 19:33   ` Michael Orlitzky
2015-11-02 19:48     ` Ciaran McCreesh
2015-11-02 20:51       ` Michael Orlitzky
2015-11-02 21:01         ` hasufell
2015-11-02 21:08           ` Ciaran McCreesh
2015-11-02 23:31           ` Chí-Thanh Christopher Nguyễn
2015-11-02 20:05     ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox