* [gentoo-portage-dev] [PATCH] slot op: do not remove := from vdb on unmatched dependencies.
@ 2014-07-31 8:57 Michał Górny
2014-07-31 15:43 ` Michał Górny
2014-08-13 19:39 ` Michał Górny
0 siblings, 2 replies; 3+ messages in thread
From: Michał Górny @ 2014-07-31 8:57 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Michał Górny
Previously, the slot operator processing code used to remove := operator
from vdb dependency entries when the underlying package was not
installed. With regards to a dependency alike || ( A:= B:= ), this
suggested that the particular slot/subslot of installed package could
be replaced by any slot/subslot of the other package. In particular, it
confused dependency comparison in @changed-deps.
Instead, store the original := (or :slot=) atom in vdb. It does not
trigger any special behavior in the current dependency resolver, yet
keeps the extra information. It also makes proper @changed-deps
comparisons possible since the comparison code can know if the original
ebuild had the slot operator.
---
pym/portage/dep/_slot_operator.py | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/pym/portage/dep/_slot_operator.py b/pym/portage/dep/_slot_operator.py
index 7b64444..7902e56 100644
--- a/pym/portage/dep/_slot_operator.py
+++ b/pym/portage/dep/_slot_operator.py
@@ -67,6 +67,11 @@ def evaluate_slot_operator_equal_deps(settings, use, trees):
return result
def _eval_deps(dep_struct, vardbs):
+ # TODO: we'd use a better || () handling, i.e. || ( A:= B:= ) with both A
+ # and B installed should record subslot on A only since the package is
+ # supposed to link against that anyway, and we have no guarantee that B
+ # has matching ABI.
+
for i, x in enumerate(dep_struct):
if isinstance(x, list):
_eval_deps(x, vardbs)
@@ -87,11 +92,15 @@ def _eval_deps(dep_struct, vardbs):
dep_struct[i] = x
break
else:
- # this dep could not be resolved, so remove the operator
- # (user may be using package.provided and managing rebuilds
- # manually)
- if x.slot:
- x = x.with_slot(x.slot)
- else:
- x = x.without_slot
- dep_struct[i] = x
+ # this dep could not be resolved, possibilities include:
+ # 1. unsatisfied branch of || () dep,
+ # 2. package.provided,
+ # 3. --nodeps.
+ #
+ # just leave it as-is for now. this does not cause any special
+ # behavior while keeping the information in vdb -- necessary
+ # e.g. for @changed-deps to work properly.
+ #
+ # TODO: make it actually cause subslot rebuilds when switching
+ # || () branches.
+ pass
--
2.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] slot op: do not remove := from vdb on unmatched dependencies.
2014-07-31 8:57 [gentoo-portage-dev] [PATCH] slot op: do not remove := from vdb on unmatched dependencies Michał Górny
@ 2014-07-31 15:43 ` Michał Górny
2014-08-13 19:39 ` Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2014-07-31 15:43 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
Dnia 2014-07-31, o godz. 10:57:20
Michał Górny <mgorny@gentoo.org> napisał(a):
> Previously, the slot operator processing code used to remove := operator
> from vdb dependency entries when the underlying package was not
> installed. With regards to a dependency alike || ( A:= B:= ), this
> suggested that the particular slot/subslot of installed package could
> be replaced by any slot/subslot of the other package. In particular, it
> confused dependency comparison in @changed-deps.
>
> Instead, store the original := (or :slot=) atom in vdb. It does not
> trigger any special behavior in the current dependency resolver, yet
> keeps the extra information. It also makes proper @changed-deps
> comparisons possible since the comparison code can know if the original
> ebuild had the slot operator.
I've just checked and that's also what paludis does.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] slot op: do not remove := from vdb on unmatched dependencies.
2014-07-31 8:57 [gentoo-portage-dev] [PATCH] slot op: do not remove := from vdb on unmatched dependencies Michał Górny
2014-07-31 15:43 ` Michał Górny
@ 2014-08-13 19:39 ` Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2014-08-13 19:39 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
Dnia 2014-07-31, o godz. 10:57:20
Michał Górny <mgorny@gentoo.org> napisał(a):
> Previously, the slot operator processing code used to remove := operator
> from vdb dependency entries when the underlying package was not
> installed. With regards to a dependency alike || ( A:= B:= ), this
> suggested that the particular slot/subslot of installed package could
> be replaced by any slot/subslot of the other package. In particular, it
> confused dependency comparison in @changed-deps.
>
> Instead, store the original := (or :slot=) atom in vdb. It does not
> trigger any special behavior in the current dependency resolver, yet
> keeps the extra information. It also makes proper @changed-deps
> comparisons possible since the comparison code can know if the original
> ebuild had the slot operator.
The patch has been resent in a new thread [1].
[1]:http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4411
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-13 19:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 8:57 [gentoo-portage-dev] [PATCH] slot op: do not remove := from vdb on unmatched dependencies Michał Górny
2014-07-31 15:43 ` Michał Górny
2014-08-13 19:39 ` 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