public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Lienhardt <michael.lienhardt@laposte.net>
To: "Michał Górny" <mgorny@gentoo.org>
Cc: gentoo-portage-dev@lists.gentoo.org, Brian Dolbec <dolsen@gentoo.org>
Subject: Re: [gentoo-portage-dev] erroneous behavior in 2-style USE dependencies?
Date: Wed, 17 Jun 2020 14:26:29 +0200	[thread overview]
Message-ID: <bd90f0ee-3e2c-75f6-92de-076022cc2203@laposte.net> (raw)
In-Reply-To: <83ae72b6d76dbf6dd2c217ba7b03832cd2f89627.camel@gentoo.org>



Le 17/06/2020 à 08:15, Michał Górny a écrit :
> On Tue, 2020-06-16 at 23:07 +0000, Michael Lienhardt wrote:
>> Dear all,
>>
>> My bad for not noticing it sooner, but when there is a dependency like ">=sys-fs/udev-208-r1:0/0[static-libs?]" (that occurs in virtual/libgudev-215-r3),
>>   since 'static-libs' is not a use flags of sys-fs/udev-242, that cpv is silently not considered during dependency solving by emerge.
>> However, the PMS states:
>>   - 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
>>
> 
> This is a bit like undefined behavior.  PMS says such a thing shouldn't
> happen (i.e. the ebuild is wrong) but does not force specific error
> handling.  You could reject the ebuild entirely or reject dependencies
> that don't have the flag in question (even if it's disabled).  You could
> also pretend it's 'static-libs(-)?' but that would be bad if the default
> was supposed to be '(+)'.

Indeed. It's true that when I read "error" I understand "something that 
never occur in a distributed gentoo repository".

> 
>> This is related to the tool I'm working on: should my tool allow this behavior, or fail like it is currently doing (I guess the former)?
> 
> That depends on what the tool is doing.  I suppose you probably don't
> need very strict behavior there.

Indeed, I don't need a strict behavior, but since I saw an ambiguity 
between the PMS and emerge, I went to check with you if this ambiguity 
was intentional, and found out along the way how to deal with this 
situation in my tool. My tool is still the SAT-based dependency analysis 
you don't really believe in :p. It's going forward slowly but (among 
other things) thanks to the help of you all, I got a paper accepted to a 
top software engineering conference. So, thanks! Of course, my final 
goal is to have the tool fully functional (it will the subject of two 
other papers -- there's a lot to say on how to deal with gentoo).

Since the current gentoo repo includes "erroneous" 2-style USE 
dependency, I will change my tool's current behavior (raising an error) 
to the "no match with warning" that Zac proposed (which seems the safest 
approach to take in the current situation).

Best,
Michael



  reply	other threads:[~2020-06-17 12:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 18:43 [gentoo-portage-dev] erroneous behavior in 2-style USE dependencies? michael.lienhardt
2020-06-16 19:42 ` Brian Dolbec
2020-06-16 23:07   ` Michael Lienhardt
2020-06-17  6:15     ` Michał Górny
2020-06-17 12:26       ` Michael Lienhardt [this message]
2020-06-16 21:31 ` Zac Medico
2020-06-17  1:38   ` Michael Lienhardt
2020-06-16 23:59     ` Zac Medico
2020-06-17  2:47       ` Michael Lienhardt
2020-06-17  1:25         ` Zac Medico
2020-06-17 10:08           ` Michael Lienhardt
2020-06-17  8:35             ` Ulrich Mueller
2020-06-17 12:01               ` Michael Lienhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd90f0ee-3e2c-75f6-92de-076022cc2203@laposte.net \
    --to=michael.lienhardt@laposte.net \
    --cc=dolsen@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox