public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] <>-DEPENDS
@ 2015-09-07 12:35 Marc Schiffbauer
  2015-09-07 12:58 ` Jauhien Piatlicki
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2015-09-07 12:35 UTC (permalink / raw
  To: gentoo-dev

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

Hi,


I'd like to propose a new kind of DEPEND syntax: <>

This would mean "Any version but the one specified" and is usefull when 
you have a dependency on another package but a single version of it is 
not compatible for example.

I currently have this case in app-backup/obnam which is not compatible 
to =dev-python/paramiko-1.13.0

In DEPEND I now have this:

  !=dev-python/paramiko-1.13.0
  || ( <dev-python/paramiko-1.13.0 >dev-python/paramiko-1.13.0 )

which does the trick, but I think much more straight forward would be:

  <>dev-python/paramiko-1.13.0

which would be the exact opposite of =dev-python/paramiko-1.13.0

An alternate syntax would be (but I'd prefer the former):

  !=dev-python/paramiko-1.13.0

What do you think and would is the proper way to suggest this for a new 
EAPI?  A new bug? On what?

TIA
-Marc

-- 
0x35A64134 - 8AAC 5F46 83B4 DB70 8317
             3723 296C 6CCA 35A6 4134

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

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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 12:35 [gentoo-dev] <>-DEPENDS Marc Schiffbauer
@ 2015-09-07 12:58 ` Jauhien Piatlicki
  2015-09-07 13:07 ` Ulrich Mueller
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Jauhien Piatlicki @ 2015-09-07 12:58 UTC (permalink / raw
  To: gentoo-dev

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

On 09/07/2015 02:35 PM, Marc Schiffbauer wrote:
> Hi,
> 
> 
> I'd like to propose a new kind of DEPEND syntax: <>
> 
> This would mean "Any version but the one specified" and is usefull when 
> you have a dependency on another package but a single version of it is 
> not compatible for example.

+1 from me. But how will this affect our already not very fast and
correct depsolver?


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

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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 12:35 [gentoo-dev] <>-DEPENDS Marc Schiffbauer
  2015-09-07 12:58 ` Jauhien Piatlicki
@ 2015-09-07 13:07 ` Ulrich Mueller
  2015-09-07 15:20   ` Marc Schiffbauer
  2015-09-07 13:18 ` Kent Fredric
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Ulrich Mueller @ 2015-09-07 13:07 UTC (permalink / raw
  To: gentoo-dev

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

>>>>> On Mon, 7 Sep 2015, Marc Schiffbauer wrote:

> I'd like to propose a new kind of DEPEND syntax: <>

> This would mean "Any version but the one specified" and is usefull
> when you have a dependency on another package but a single version
> of it is not compatible for example.

This doesn't look like a feature that would be needed very often.
Since "<>cat/foo-1" is equivalent to "|| ( >cat/foo-1 <cat-foo-1 )"
I wonder if it's worth the effort.

> [...]

> What do you think and would is the proper way to suggest this for a
> new EAPI? A new bug? On what?

It should be filed as a bug (assigned to "Gentoo Hosted Projects" /
"PMS/EAPI").

Your proposal looks like a special case of bug 4315, though.

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 12:35 [gentoo-dev] <>-DEPENDS Marc Schiffbauer
  2015-09-07 12:58 ` Jauhien Piatlicki
  2015-09-07 13:07 ` Ulrich Mueller
@ 2015-09-07 13:18 ` Kent Fredric
  2015-09-07 15:26   ` Marc Schiffbauer
  2015-09-07 14:41 ` Ian Stakenvicius
  2015-09-07 15:16 ` Michał Górny
  4 siblings, 1 reply; 11+ messages in thread
From: Kent Fredric @ 2015-09-07 13:18 UTC (permalink / raw
  To: gentoo-dev

On 8 September 2015 at 00:35, Marc Schiffbauer <mschiff@gentoo.org> wrote:
> I currently have this case in app-backup/obnam which is not compatible
> to =dev-python/paramiko-1.13.0
>
> In DEPEND I now have this:
>
>   !=dev-python/paramiko-1.13.0
>   || ( <dev-python/paramiko-1.13.0 >dev-python/paramiko-1.13.0 )
>
> which does the trick, but I think much more straight forward would be:
>
>   <>dev-python/paramiko-1.13.0
>
> which would be the exact opposite of =dev-python/paramiko-1.13.0
>
> An alternate syntax would be (but I'd prefer the former):
>
>   !=dev-python/paramiko-1.13.0
>
> What do you think and would is the proper way to suggest this for a new
> EAPI?  A new bug? On what


My opposition would be I figure its more likely you want a range of
exclusion, not a single version.

EG: you don't really want !=dev-python/paramiko-1.13.0 , you want
!=dev-python/paramiko1.13.0{,-r{0..999}} or something.

But distinguishing between "Just this exact version" and "This range" is hard.

Does <> Imply "and any -rversion" ?

Does <> imply "and any sub-version" like ~ does ?


-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL


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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 12:35 [gentoo-dev] <>-DEPENDS Marc Schiffbauer
                   ` (2 preceding siblings ...)
  2015-09-07 13:18 ` Kent Fredric
@ 2015-09-07 14:41 ` Ian Stakenvicius
  2015-09-07 15:31   ` Marc Schiffbauer
  2015-09-07 15:16 ` Michał Górny
  4 siblings, 1 reply; 11+ messages in thread
From: Ian Stakenvicius @ 2015-09-07 14:41 UTC (permalink / raw
  To: gentoo-dev@lists.gentoo.org



Sent from an iPhone, sorry for the HTML...

> On Sep 7, 2015, at 8:35 AM, Marc Schiffbauer <mschiff@gentoo.org> wrote:
> 
> Hi,
> 
> 
> I'd like to propose a new kind of DEPEND syntax: <>
> 
> This would mean "Any version but the one specified" and is usefull when 
> you have a dependency on another package but a single version of it is 
> not compatible for example.
> 
> I currently have this case in app-backup/obnam which is not compatible 
> to =dev-python/paramiko-1.13.0
> 
> In DEPEND I now have this:
> 
>  !=dev-python/paramiko-1.13.0
>  || ( <dev-python/paramiko-1.13.0 >dev-python/paramiko-1.13.0 )
> 
> which does the trick, but I think much more straight forward would be:
> 
>  <>dev-python/paramiko-1.13.0
> 
> which would be the exact opposite of =dev-python/paramiko-1.13.0
> 
> An alternate syntax would be (but I'd prefer the former):
> 
>  !=dev-python/paramiko-1.13.0
> 
> What do you think and would is the proper way to suggest this for a new 
> EAPI?  A new bug? On what?
> 
> TIA
> -


Why not just:

DEPEND="
dev-python/paramiko
!~dev-python/paramiko-1.13.0
"

Depend on the package but block the individual atom(s) that don't work?

Given that there will be *very few* valid use cases for this type of syntax I don't know if it's such a good idea to add it.  I expect adding this new syntax would be more likely to cause issues via improper usage than it would add a benefit or fill any massively pressing need...



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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 12:35 [gentoo-dev] <>-DEPENDS Marc Schiffbauer
                   ` (3 preceding siblings ...)
  2015-09-07 14:41 ` Ian Stakenvicius
@ 2015-09-07 15:16 ` Michał Górny
  2015-09-07 15:58   ` Marc Schiffbauer
  4 siblings, 1 reply; 11+ messages in thread
From: Michał Górny @ 2015-09-07 15:16 UTC (permalink / raw
  To: Marc Schiffbauer; +Cc: gentoo-dev

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

Dnia 2015-09-07, o godz. 14:35:07
Marc Schiffbauer <mschiff@gentoo.org> napisał(a):

> I'd like to propose a new kind of DEPEND syntax: <>
> 
> This would mean "Any version but the one specified" and is usefull when 
> you have a dependency on another package but a single version of it is 
> not compatible for example.
> 
> I currently have this case in app-backup/obnam which is not compatible 
> to =dev-python/paramiko-1.13.0
> 
> In DEPEND I now have this:
> 
>   !=dev-python/paramiko-1.13.0
>   || ( <dev-python/paramiko-1.13.0 >dev-python/paramiko-1.13.0 )
> 
> which does the trick, but I think much more straight forward would be:
> 
>   <>dev-python/paramiko-1.13.0
> 
> which would be the exact opposite of =dev-python/paramiko-1.13.0

What if you want to exclude two versions? This looks like an even worse
case of the > + < -dep problem.

> An alternate syntax would be (but I'd prefer the former):
> 
>   !=dev-python/paramiko-1.13.0

This is a blocker syntax, so it's used already.

-- 
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] <>-DEPENDS
  2015-09-07 13:07 ` Ulrich Mueller
@ 2015-09-07 15:20   ` Marc Schiffbauer
  0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2015-09-07 15:20 UTC (permalink / raw
  To: gentoo-dev

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

* Ulrich Mueller schrieb am 07.09.15 um 15:07 Uhr:
> >>>>> On Mon, 7 Sep 2015, Marc Schiffbauer wrote:
> 
> > I'd like to propose a new kind of DEPEND syntax: <>
> 
> > This would mean "Any version but the one specified" and is usefull
> > when you have a dependency on another package but a single version
> > of it is not compatible for example.
> 
> This doesn't look like a feature that would be needed very often.
> Since "<>cat/foo-1" is equivalent to "|| ( >cat/foo-1 <cat-foo-1 )"
> I wonder if it's worth the effort.

Valid point. I am unsure. If it it would make the resolver noticable 
slower, I'd say now. Otherwise propably yes.

> 
> > [...]
> 
> > What do you think and would is the proper way to suggest this for a
> > new EAPI? A new bug? On what?
> 
> It should be filed as a bug (assigned to "Gentoo Hosted Projects" /
> "PMS/EAPI").

Thanks.

> 
> Your proposal looks like a special case of bug 4315, though.

Which is solved using || ( >foo <foo ) I guess …

-Marc


-- 
0x35A64134 - 8AAC 5F46 83B4 DB70 8317
             3723 296C 6CCA 35A6 4134

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

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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 13:18 ` Kent Fredric
@ 2015-09-07 15:26   ` Marc Schiffbauer
  2015-09-08  4:58     ` Kent Fredric
  0 siblings, 1 reply; 11+ messages in thread
From: Marc Schiffbauer @ 2015-09-07 15:26 UTC (permalink / raw
  To: gentoo-dev

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

* Kent Fredric schrieb am 07.09.15 um 15:18 Uhr:
> On 8 September 2015 at 00:35, Marc Schiffbauer <mschiff@gentoo.org> wrote:
> > What do you think and would is the proper way to suggest this for a new
> > EAPI?  A new bug? On what
> 
> 
> My opposition would be I figure its more likely you want a range of
> exclusion, not a single version.
> 
> EG: you don't really want !=dev-python/paramiko-1.13.0 , you want
> !=dev-python/paramiko1.13.0{,-r{0..999}} or something.

Erm. +1 
You are of cause right. So you just discovered a potential bug in my 
ebuild :-P

> 
> But distinguishing between "Just this exact version" and "This range" is hard.
> 
> Does <> Imply "and any -rversion" ?
> 
> Does <> imply "and any sub-version" like ~ does ?

Well, than I might change my mind and prefer != over <> as it would be 
more flexible:

!=foo/bar-1 => exact version
!~foo/bar-1 => that version and any revision

And as the cherry on the cake theere could be

<> ( foo/bar-1 foo/bar-5 )

To express real ranges (that would include revisions)

-Marc

-- 
0x35A64134 - 8AAC 5F46 83B4 DB70 8317
             3723 296C 6CCA 35A6 4134

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

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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 14:41 ` Ian Stakenvicius
@ 2015-09-07 15:31   ` Marc Schiffbauer
  0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2015-09-07 15:31 UTC (permalink / raw
  To: gentoo-dev

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

* Ian Stakenvicius schrieb am 07.09.15 um 16:41 Uhr:
> Why not just:
> 
> DEPEND="
> dev-python/paramiko
> !~dev-python/paramiko-1.13.0
> "
> 
> Depend on the package but block the individual atom(s) that don't work?

I like it. At least with the current possibilities. I was not aware that 
"!~" is already a valid blocker.


> 
> Given that there will be *very few* valid use cases for this type of
> syntax I don't know if it's such a good idea to add it.  I expect
> adding this new syntax would be more likely to cause issues via
> improper usage than it would add a benefit or fill any massively
> pressing need...

Depending on how it is implemented, I think it would be intuitive to 
use. I'd find having "=" vs. "!=" and "~" vs. "!~" straight forward.

You are of cource right that there is no "massively pressing need" atm.  
But that was not always a reason for a new feature ;)

-Marc

-- 
0x35A64134 - 8AAC 5F46 83B4 DB70 8317
             3723 296C 6CCA 35A6 4134

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

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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 15:16 ` Michał Górny
@ 2015-09-07 15:58   ` Marc Schiffbauer
  0 siblings, 0 replies; 11+ messages in thread
From: Marc Schiffbauer @ 2015-09-07 15:58 UTC (permalink / raw
  To: gentoo-dev

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

* Michał Górny schrieb am 07.09.15 um 17:16 Uhr:
> Dnia 2015-09-07, o godz. 14:35:07
> Marc Schiffbauer <mschiff@gentoo.org> napisał(a):
> 
> > I'd like to propose a new kind of DEPEND syntax: <>
> > 
> > This would mean "Any version but the one specified" and is usefull when 
> > you have a dependency on another package but a single version of it is 
> > not compatible for example.
> > 
> > I currently have this case in app-backup/obnam which is not compatible 
> > to =dev-python/paramiko-1.13.0
> > 
> > In DEPEND I now have this:
> > 
> >   !=dev-python/paramiko-1.13.0
> >   || ( <dev-python/paramiko-1.13.0 >dev-python/paramiko-1.13.0 )
> > 
> > which does the trick, but I think much more straight forward would be:
> > 
> >   <>dev-python/paramiko-1.13.0
> > 
> > which would be the exact opposite of =dev-python/paramiko-1.13.0
> 
> What if you want to exclude two versions? This looks like an even worse
> case of the > + < -dep problem.
> 
> > An alternate syntax would be (but I'd prefer the former):
> > 
> >   !=dev-python/paramiko-1.13.0
> 
> This is a blocker syntax, so it's used already.

OK thanks. And I ignored that fact in one of my other mails. So I guess 
this ends up in: Never mind ;)



-- 
0x35A64134 - 8AAC 5F46 83B4 DB70 8317
             3723 296C 6CCA 35A6 4134

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

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

* Re: [gentoo-dev] <>-DEPENDS
  2015-09-07 15:26   ` Marc Schiffbauer
@ 2015-09-08  4:58     ` Kent Fredric
  0 siblings, 0 replies; 11+ messages in thread
From: Kent Fredric @ 2015-09-08  4:58 UTC (permalink / raw
  To: gentoo-dev

On 8 September 2015 at 03:26, Marc Schiffbauer <mschiff@gentoo.org> wrote:
> And as the cherry on the cake theere could be
>
> <> ( foo/bar-1 foo/bar-5 )


I kinda tried suggesting a similar syntax, but then I realised it
couldn't work, because it implicitly says "none of these" but it
doesn't state any sort of "Pull something"

And then I wondered what:

<> ( foo/bar-1 foo/quux-1 )

would do and my head exploded with all the pain.

So as verbose as the current syntax may be, its very easy to design
something worse, so I figure it better not to do anything unless we're
sure we haven't made a mess of it.

=foo-bar/baz-(<4.9-r999,>5.0)

Or something, where "mixing the package atoms up is impossible", and
that way the planner could know that the versions applied to a single
requirement, instead of having to guess what it all means when it sees
3 specifications for the same package and going crazy with
backtracking.


-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL


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

end of thread, other threads:[~2015-09-08  4:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 12:35 [gentoo-dev] <>-DEPENDS Marc Schiffbauer
2015-09-07 12:58 ` Jauhien Piatlicki
2015-09-07 13:07 ` Ulrich Mueller
2015-09-07 15:20   ` Marc Schiffbauer
2015-09-07 13:18 ` Kent Fredric
2015-09-07 15:26   ` Marc Schiffbauer
2015-09-08  4:58     ` Kent Fredric
2015-09-07 14:41 ` Ian Stakenvicius
2015-09-07 15:31   ` Marc Schiffbauer
2015-09-07 15:16 ` Michał Górny
2015-09-07 15:58   ` Marc Schiffbauer

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