public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Repoman check and QA policy for slot deps/operator
@ 2014-08-07  9:24 Michał Górny
  2014-08-07  9:41 ` [gentoo-dev] " Ulrich Mueller
  2014-08-07 15:37 ` Duncan
  0 siblings, 2 replies; 7+ messages in thread
From: Michał Górny @ 2014-08-07  9:24 UTC (permalink / raw
  To: gentoo-dev, qa

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

Hello, all.

Since the tree is still full of too broad dependencies and other
mistakes, I would like to add a repoman check and a matching QA policy
regarding how slots should be used in dependencies.

The check would apply to EAPI 5 and newer ebuilds only. Considering
the past uproar against having slotted dependencies against
single-slot packages, it would apply only to dependencies that match
more than one slot of a package.


With the new policy, the simple form of dependencies:

  dev-libs/foo

would be only allowed if dev-libs/foo has only one slot.

If the atom matches more than one slot of a package, one of the
following forms would need to be used:

1. dev-libs/bar:* -- if any version of bar is acceptable,
and you can replace bar:1 with bar:2 without rebuilding,

2. dev-libs/bar:= -- if any version of bar is acceptable,
and you need to rebuild bar when changing slots (and subslots),

3. dev-libs/bar:slot -- if a single slot of bar is acceptable,
and you can change subslots without rebuilding,

4. dev-libs/bar:slot= -- if a single slot of bar is acceptable,
and you need subslot rebuilds,

5. dev-libs/bar:slot/subslot -- if a single subslot of bar is
acceptable, useful mostly for binary packages and pass-through
virtuals.

...which means that the only 'new' requirement would be that ':*'
operator becomes mandatory in favor of plain deps that have semi-
-undefined behavior.


It should be noted that the check uses complete dependency atom to
count the number of slots. That is, a dependency alike:

  >=x11-libs/gtk+-3.4

would match only one slot and cause no repoman warnings. This is mostly
intended to keep the check simple and avoid false positives.


If anyone wishes to test the current code, the last version of patch
can be found at [1]. It will likely hit portage in -9999 as soon
as dol-sen approves it.

[1]:http://article.gmane.org/gmane.linux.gentoo.portage.devel/4369

-- 
Best regards,
Michał Górny

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

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

* [gentoo-dev] Re: Repoman check and QA policy for slot deps/operator
  2014-08-07  9:24 [gentoo-dev] Repoman check and QA policy for slot deps/operator Michał Górny
@ 2014-08-07  9:41 ` Ulrich Mueller
  2014-08-07 10:55   ` Michał Górny
  2014-08-07 15:37 ` Duncan
  1 sibling, 1 reply; 7+ messages in thread
From: Ulrich Mueller @ 2014-08-07  9:41 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev, qa

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

>>>>> On Thu, 7 Aug 2014, Michał Górny wrote:

> Since the tree is still full of too broad dependencies and other
> mistakes, I would like to add a repoman check and a matching QA
> policy regarding how slots should be used in dependencies.

> The check would apply to EAPI 5 and newer ebuilds only. Considering
> the past uproar against having slotted dependencies against
> single-slot packages, it would apply only to dependencies that match
> more than one slot of a package.

For what type of dependencies would that check apply? IIUC, it would
only make sense for packages that appear both in DEPEND and RDEPEND.

Ulrich

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

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

* Re: [gentoo-dev] Re: Repoman check and QA policy for slot deps/operator
  2014-08-07  9:41 ` [gentoo-dev] " Ulrich Mueller
@ 2014-08-07 10:55   ` Michał Górny
  0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2014-08-07 10:55 UTC (permalink / raw
  To: Ulrich Mueller; +Cc: gentoo-dev, qa

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

Dnia 2014-08-07, o godz. 11:41:31
Ulrich Mueller <ulm@gentoo.org> napisał(a):

> >>>>> On Thu, 7 Aug 2014, Michał Górny wrote:
> 
> > Since the tree is still full of too broad dependencies and other
> > mistakes, I would like to add a repoman check and a matching QA
> > policy regarding how slots should be used in dependencies.
> 
> > The check would apply to EAPI 5 and newer ebuilds only. Considering
> > the past uproar against having slotted dependencies against
> > single-slot packages, it would apply only to dependencies that match
> > more than one slot of a package.
> 
> For what type of dependencies would that check apply? IIUC, it would
> only make sense for packages that appear both in DEPEND and RDEPEND.

The test is applied to RDEPEND only. I don't think it's a good idea to
play with intersections of dependencies -- that would be hard to
implement and therefore fragile.

Furthermore, :* guarantees runtime switching support. Lack of any
operator indicates semi-undefined behavior, e.g. paludis tries
the safest route possible and requires all slots installed at build
time.

-- 
Best regards,
Michał Górny

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

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

* [gentoo-dev] Re: Repoman check and QA policy for slot deps/operator
  2014-08-07  9:24 [gentoo-dev] Repoman check and QA policy for slot deps/operator Michał Górny
  2014-08-07  9:41 ` [gentoo-dev] " Ulrich Mueller
@ 2014-08-07 15:37 ` Duncan
  2014-08-07 16:03   ` Michał Górny
  1 sibling, 1 reply; 7+ messages in thread
From: Duncan @ 2014-08-07 15:37 UTC (permalink / raw
  To: gentoo-dev

Michał Górny posted on Thu, 07 Aug 2014 11:24:43 +0200 as excerpted:

> With the new policy, the simple form of dependencies:
> 
>   dev-libs/foo
> 
> would be only allowed if dev-libs/foo has only one slot.
> 
> If the atom matches more than one slot of a package, one of the
> following forms would need to be used:
> 
> 1. dev-libs/bar:* -- if any version of bar is acceptable,
> and you can replace bar:1 with bar:2 without rebuilding,
> 
> 2. dev-libs/bar:= -- if any version of bar is acceptable,
> and you need to rebuild bar when changing slots (and subslots),
> 
> 3. dev-libs/bar:slot -- if a single slot of bar is acceptable, and you
> can change subslots without rebuilding,
> 
> 4. dev-libs/bar:slot= -- if a single slot of bar is acceptable,
> and you need subslot rebuilds,
> 
> 5. dev-libs/bar:slot/subslot -- if a single subslot of bar is
> acceptable, useful mostly for binary packages and pass-through virtuals.

I'm admittedly operating a bit out of my league here so feel free to 
ignore this if it's simply noise, but in the interest of a clearer policy 
I'll take the risk of being stupid...

Perhaps this can't happen in practice, but there's an obviously missing 
permutation that for completeness (and to avoid questions like this), 
probably should have been covered with a notation such as <can't happen>, 
or perhaps <can happen but not covered, use the stricter #2 form>:

6. dev-libs/bar<what?> -- if any version of bar is acceptable, and you 
need to rebuild bar only when changing slots (but not subslots).

Can it happen?  Covered if so?

Tho you did switch from dev-libs/foo in the initial statement to
dev-libs/bar in the list of permutations.  Normally, I take that to imply 
some relationship between foo and bar, thus the need for two labels 
instead of reusing the first, but if there is such a relationship here I 
don't see it.  I am certainly confused but is it because there such a 
relationship that I'm simply not seeing (that possibly eliminates my 
sixth permutation), or did you "switch horses in mid-stream", as the 
saying goes?

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



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

* Re: [gentoo-dev] Re: Repoman check and QA policy for slot deps/operator
  2014-08-07 15:37 ` Duncan
@ 2014-08-07 16:03   ` Michał Górny
  2014-08-07 17:30     ` Duncan
  0 siblings, 1 reply; 7+ messages in thread
From: Michał Górny @ 2014-08-07 16:03 UTC (permalink / raw
  To: Duncan; +Cc: gentoo-dev

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

Dnia 2014-08-07, o godz. 15:37:07
Duncan <1i5t5.duncan@cox.net> napisał(a):

> Michał Górny posted on Thu, 07 Aug 2014 11:24:43 +0200 as excerpted:
> 
> > With the new policy, the simple form of dependencies:
> > 
> >   dev-libs/foo
> > 
> > would be only allowed if dev-libs/foo has only one slot.
> > 
> > If the atom matches more than one slot of a package, one of the
> > following forms would need to be used:
> > 
> > 1. dev-libs/bar:* -- if any version of bar is acceptable,
> > and you can replace bar:1 with bar:2 without rebuilding,
> > 
> > 2. dev-libs/bar:= -- if any version of bar is acceptable,
> > and you need to rebuild bar when changing slots (and subslots),
> > 
> > 3. dev-libs/bar:slot -- if a single slot of bar is acceptable, and you
> > can change subslots without rebuilding,
> > 
> > 4. dev-libs/bar:slot= -- if a single slot of bar is acceptable,
> > and you need subslot rebuilds,
> > 
> > 5. dev-libs/bar:slot/subslot -- if a single subslot of bar is
> > acceptable, useful mostly for binary packages and pass-through virtuals.
> 
> I'm admittedly operating a bit out of my league here so feel free to 
> ignore this if it's simply noise, but in the interest of a clearer policy 
> I'll take the risk of being stupid...
> 
> Perhaps this can't happen in practice, but there's an obviously missing 
> permutation that for completeness (and to avoid questions like this), 
> probably should have been covered with a notation such as <can't happen>, 
> or perhaps <can happen but not covered, use the stricter #2 form>:
> 
> 6. dev-libs/bar<what?> -- if any version of bar is acceptable, and you 
> need to rebuild bar only when changing slots (but not subslots).
> 
> Can it happen?  Covered if so?

Long story short, PMS doesn't provide a way do this. I can't think of
any use case for that, and I think that is one of the reasons no syntax
for that was provided.

Please note that slot operators := and :* were initially designed to
deal with slots alone. You could consider that a coincidence that there
were added in the same EAPI as subslots which were invented much later
and have a different origin.

The slot operators were supposed to help dealing with 'completely'
slotted packages, in which slots corresponded to library ABI versions.
However, that required some effort to make different versions parallel-
-installable.

Therefore, subslots were added to allow getting some of the benefits of
slotting without all the requirements (like parallel-installability).
Subslots are rarely used on their own -- they are usually appended to
the slot. Then, the := and :* slot operators simply interpreter 'SLOT'
as 'slot/subslot'.

> Tho you did switch from dev-libs/foo in the initial statement to
> dev-libs/bar in the list of permutations.  Normally, I take that to imply 
> some relationship between foo and bar, thus the need for two labels 
> instead of reusing the first, but if there is such a relationship here I 
> don't see it.  I am certainly confused but is it because there such a 
> relationship that I'm simply not seeing (that possibly eliminates my 
> sixth permutation), or did you "switch horses in mid-stream", as the 
> saying goes?

dev-libs/foo has a single slot. dev-libs/bar has multiple slots.

-- 
Best regards,
Michał Górny

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

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

* [gentoo-dev] Re: Repoman check and QA policy for slot deps/operator
  2014-08-07 16:03   ` Michał Górny
@ 2014-08-07 17:30     ` Duncan
  2014-08-08 10:11       ` Peter Stuge
  0 siblings, 1 reply; 7+ messages in thread
From: Duncan @ 2014-08-07 17:30 UTC (permalink / raw
  To: gentoo-dev

Michał Górny posted on Thu, 07 Aug 2014 18:03:18 +0200 as excerpted:

> Dnia 2014-08-07, o godz. 15:37:07 Duncan <1i5t5.duncan@cox.net>
> napisał(a):
> 
>> 6. dev-libs/bar<what?> -- if any version of bar is acceptable, and you
>> need to rebuild bar only when changing slots (but not subslots).
>> 
>> Can it happen?  Covered if so?
> 
> Long story short, PMS doesn't provide a way do this. I can't think of
> any use case for that, and I think that is one of the reasons no syntax
> for that was provided.

Makes sense.  Good to have confirmation of what I suspected.

>> Tho you did switch from dev-libs/foo in the initial statement to
>> dev-libs/bar in the list of permutations.  Normally, I take that to
>> imply some relationship between foo and bar, thus the need for two
>> labels instead of reusing the first, but if there is such a
>> relationship here I don't see it.  I am certainly confused but is it
>> because there such a relationship that I'm simply not seeing (that
>> possibly eliminates my sixth permutation), or did you "switch horses in
>> mid-stream", as the saying goes?
> 
> dev-libs/foo has a single slot. dev-libs/bar has multiple slots.

MUCH clearer now.  Thanks. =:^)

(Hmm... my client's warning says I'm not verbose enough, too much quoted 
text for my reply.  /That/ doesn't happen very often! After adding this 
note it's the "continue anyway" button. =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



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

* Re: [gentoo-dev] Re: Repoman check and QA policy for slot deps/operator
  2014-08-07 17:30     ` Duncan
@ 2014-08-08 10:11       ` Peter Stuge
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Stuge @ 2014-08-08 10:11 UTC (permalink / raw
  To: gentoo-dev

Duncan wrote:
> (Hmm... my client's warning says I'm not verbose enough, too much quoted 
> text for my reply.  /That/ doesn't happen very often! After adding this 
> note it's the "continue anyway" button. =:^)

Here is a friendly reminder for everyone;

Please remove more quoted text. Full-quote in particular is never awesome.


Thank you, and have a nice weekend

//Peter


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

end of thread, other threads:[~2014-08-08 10:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-07  9:24 [gentoo-dev] Repoman check and QA policy for slot deps/operator Michał Górny
2014-08-07  9:41 ` [gentoo-dev] " Ulrich Mueller
2014-08-07 10:55   ` Michał Górny
2014-08-07 15:37 ` Duncan
2014-08-07 16:03   ` Michał Górny
2014-08-07 17:30     ` Duncan
2014-08-08 10:11       ` Peter Stuge

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