public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: making repoman complain about USE dependencies that lock packages at old version
@ 2015-04-05 16:50 Michał Górny
  2015-04-05 17:16 ` Alexis Ballier
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michał Górny @ 2015-04-05 16:50 UTC (permalink / raw
  To: gentoo-dev; +Cc: qa

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

Hi,

This is quite a Portage patch topic but since devs are known to be
unhappy about any change, I would like to start a bikeshed first.

The idea is to make repoman/pcheck complain if the newest ebuild
matched by version+slot restriction of dependency atom can't satisfy
the USE dependency, or in other words, whenever the USE restriction
forces lower version of package being installed.

For example, let's assume the following:

a. foo-1 has USE=bar,

b. bar-1 depends on foo[bar],

c. foo-2 no longer has USE=bar.

In the usual scenario this means that bar-1 will silently lock foo
at version 1. Since this is quite implicit, users don't notice
the problem and left unnoticed for a long time, it starts to hurt bad
at some point.

With the added check, after step (c) above repoman/pcheck would warn on
bar-1 that 'foo[bar]' dependency forces lower version than plain 'foo'.
Since version and slot restrictions will be taken into consideration,
it will possible to silence the warning by using:

  <foo-2[bar]

explicitly, if the dependency can't be fixed for foo-2 properly. While
not improving the final result a lot, it will at least give an explicit
'<' or '=' atom that can be easily found with grep when considering old
version removal.

What are your thoughts?

-- 
Best regards,
Michał Górny

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

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

* Re: [gentoo-dev] RFC: making repoman complain about USE dependencies that lock packages at old version
  2015-04-05 16:50 [gentoo-dev] RFC: making repoman complain about USE dependencies that lock packages at old version Michał Górny
@ 2015-04-05 17:16 ` Alexis Ballier
  2015-04-05 17:32 ` [gentoo-dev] " Ulrich Mueller
  2015-04-05 17:38 ` [gentoo-dev] " Dirkjan Ochtman
  2 siblings, 0 replies; 5+ messages in thread
From: Alexis Ballier @ 2015-04-05 17:16 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev, qa

On Sun, 5 Apr 2015 18:50:10 +0200
Michał Górny <mgorny@gentoo.org> wrote:

> What are your thoughts?


if the version+slot restriction on foo in bar-1.ebuild contains foo
packages that don't have bar useflag then it's an error in
bar-1.ebuild (I think pms is pretty clear about this)

Alexis.


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

* [gentoo-dev] Re: RFC: making repoman complain about USE dependencies that lock packages at old version
  2015-04-05 16:50 [gentoo-dev] RFC: making repoman complain about USE dependencies that lock packages at old version Michał Górny
  2015-04-05 17:16 ` Alexis Ballier
@ 2015-04-05 17:32 ` Ulrich Mueller
  2015-04-05 17:40   ` Michał Górny
  2015-04-05 17:38 ` [gentoo-dev] " Dirkjan Ochtman
  2 siblings, 1 reply; 5+ messages in thread
From: Ulrich Mueller @ 2015-04-05 17:32 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev, qa

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

>>>>> On Sun, 5 Apr 2015, Michał Górny wrote:

> This is quite a Portage patch topic but since devs are known to be
> unhappy about any change, I would like to start a bikeshed first.

> The idea is to make repoman/pcheck complain if the newest ebuild
> matched by version+slot restriction of dependency atom can't satisfy
> the USE dependency, or in other words, whenever the USE restriction
> forces lower version of package being installed.

> For example, let's assume the following:

> a. foo-1 has USE=bar,

> b. bar-1 depends on foo[bar],

> c. foo-2 no longer has USE=bar.

> In the usual scenario this means that bar-1 will silently lock foo
> at version 1. Since this is quite implicit, users don't notice
> the problem and left unnoticed for a long time, it starts to hurt
> bad at some point.

Is "foo[bar]" even a legal dependency, if there are versions of foo
that don't have the bar flag in their IUSE? (PMS doesn't seem to be
entirely clear about this: "... it is an error for a use dependency to
be applied to an ebuild which does not have the flag in question in
IUSE_REFERENCEABLE.")

So yes, make repoman shout about it. Loudly. :)

> With the added check, after step (c) above repoman/pcheck would warn
> on bar-1 that 'foo[bar]' dependency forces lower version than plain
> 'foo'. Since version and slot restrictions will be taken into
> consideration, it will possible to silence the warning by using:

>   <foo-2[bar]

> explicitly, if the dependency can't be fixed for foo-2 properly.
> While not improving the final result a lot, it will at least give an
> explicit '<' or '=' atom that can be easily found with grep when
> considering old version removal.

> What are your thoughts?

How are you going to treat "foo[bar(-)]" and "foo[bar(+)]"?

Ulrich

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

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

* Re: [gentoo-dev] RFC: making repoman complain about USE dependencies that lock packages at old version
  2015-04-05 16:50 [gentoo-dev] RFC: making repoman complain about USE dependencies that lock packages at old version Michał Górny
  2015-04-05 17:16 ` Alexis Ballier
  2015-04-05 17:32 ` [gentoo-dev] " Ulrich Mueller
@ 2015-04-05 17:38 ` Dirkjan Ochtman
  2 siblings, 0 replies; 5+ messages in thread
From: Dirkjan Ochtman @ 2015-04-05 17:38 UTC (permalink / raw
  To: Gentoo Development; +Cc: qa

On Sun, Apr 5, 2015 at 6:50 PM, Michał Górny <mgorny@gentoo.org> wrote:
> What are your thoughts?

Sounds useful to me!

Cheers,

Dirkjan


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

* Re: [gentoo-dev] Re: RFC: making repoman complain about USE dependencies that lock packages at old version
  2015-04-05 17:32 ` [gentoo-dev] " Ulrich Mueller
@ 2015-04-05 17:40   ` Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2015-04-05 17:40 UTC (permalink / raw
  To: Ulrich Mueller; +Cc: gentoo-dev, qa

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

Dnia 2015-04-05, o godz. 19:32:01
Ulrich Mueller <ulm@gentoo.org> napisał(a):

> >>>>> On Sun, 5 Apr 2015, Michał Górny wrote:
> 
> > This is quite a Portage patch topic but since devs are known to be
> > unhappy about any change, I would like to start a bikeshed first.
> 
> > The idea is to make repoman/pcheck complain if the newest ebuild
> > matched by version+slot restriction of dependency atom can't satisfy
> > the USE dependency, or in other words, whenever the USE restriction
> > forces lower version of package being installed.
> 
> > For example, let's assume the following:
> 
> > a. foo-1 has USE=bar,
> 
> > b. bar-1 depends on foo[bar],
> 
> > c. foo-2 no longer has USE=bar.
> 
> > In the usual scenario this means that bar-1 will silently lock foo
> > at version 1. Since this is quite implicit, users don't notice
> > the problem and left unnoticed for a long time, it starts to hurt
> > bad at some point.
> 
> Is "foo[bar]" even a legal dependency, if there are versions of foo
> that don't have the bar flag in their IUSE? (PMS doesn't seem to be
> entirely clear about this: "... it is an error for a use dependency to
> be applied to an ebuild which does not have the flag in question in
> IUSE_REFERENCEABLE.")
> 
> So yes, make repoman shout about it. Loudly. :)

Well, I would interpret the PMS here as: '[foo?]' restricts to foo-1
even with USE=-foo. Though Portage disagrees here, I guess :).

> 
> > With the added check, after step (c) above repoman/pcheck would warn
> > on bar-1 that 'foo[bar]' dependency forces lower version than plain
> > 'foo'. Since version and slot restrictions will be taken into
> > consideration, it will possible to silence the warning by using:
> 
> >   <foo-2[bar]
> 
> > explicitly, if the dependency can't be fixed for foo-2 properly.
> > While not improving the final result a lot, it will at least give an
> > explicit '<' or '=' atom that can be easily found with grep when
> > considering old version removal.
> 
> > What are your thoughts?
> 
> How are you going to treat "foo[bar(-)]" and "foo[bar(+)]"?

Well, bar(-) restricts the possible version as well, so it desires
a warning. As for bar(+), it's often the actual solution so no warning
for that.

-- 
Best regards,
Michał Górny

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

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

end of thread, other threads:[~2015-04-05 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-05 16:50 [gentoo-dev] RFC: making repoman complain about USE dependencies that lock packages at old version Michał Górny
2015-04-05 17:16 ` Alexis Ballier
2015-04-05 17:32 ` [gentoo-dev] " Ulrich Mueller
2015-04-05 17:40   ` Michał Górny
2015-04-05 17:38 ` [gentoo-dev] " Dirkjan Ochtman

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