From b4ab8d3877ab1ce7ecbefdd57c2c0f81c9de3eb3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 21 Jun 2016 08:48:04 +0100 Subject: ebuild-test/RDEPEND-slotop-any-of: new test Add test for slot operator in any-of style RDEPEND. Repoman got support for it in: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c2594facc9a0c807ed148fd5bf76499fe2f3dbc5 Signed-off-by: Sergei Trofimovich --- .../RDEPEND-slotop-any-of-0.ebuild | 17 ++++++++++ ebuild-test/RDEPEND-slotop-any-of/metadata.xml | 39 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 ebuild-test/RDEPEND-slotop-any-of/RDEPEND-slotop-any-of-0.ebuild create mode 100644 ebuild-test/RDEPEND-slotop-any-of/metadata.xml (limited to 'ebuild-test') diff --git a/ebuild-test/RDEPEND-slotop-any-of/RDEPEND-slotop-any-of-0.ebuild b/ebuild-test/RDEPEND-slotop-any-of/RDEPEND-slotop-any-of-0.ebuild new file mode 100644 index 0000000..2e19378 --- /dev/null +++ b/ebuild-test/RDEPEND-slotop-any-of/RDEPEND-slotop-any-of-0.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +DESCRIPTION="Pass ':=' to '||' conditionals" +HOMEPAGE="http://gentoo.org/" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +# Correct dependency for this case would be to move ':=' out of 'any-of' clause: +# RDEPEND=" +# not-broken/pkg1-subslot:= +# || ( =not-broken/pkg1-subslot-0 =not-broken/pkg1-subslot-1 )" +RDEPEND="|| ( =not-broken/pkg1-subslot-0:= =not-broken/pkg1-subslot-1:0= )" diff --git a/ebuild-test/RDEPEND-slotop-any-of/metadata.xml b/ebuild-test/RDEPEND-slotop-any-of/metadata.xml new file mode 100644 index 0000000..e71c729 --- /dev/null +++ b/ebuild-test/RDEPEND-slotop-any-of/metadata.xml @@ -0,0 +1,39 @@ + + + + + Test for rebuild slot operator in 'any-of' (or '||') RDEPEND. + + This particular example breaks in the following way: + + Suppose we have Two packages installed: + - not-broken/pkg1-subslot-0 + - ebuld-test/RDEPEND-any-of-slotop-0 + + In this case the + RDEPEND="|| ( =not-broken/pkg1-subslot-0:= =not-broken/pkg1-subslot-1:= )" + gets expanded by portage to the following vdb entry: + RDEPEND="|| ( =not-broken/pkg1-subslot-0:0/0= =not-broken/pkg1-subslot-1:= )" + + Note the second unexpanded alternative. + + Then to trigger a bug we need to try to update depend only: + emerge -1 not-broken/pkg1-subslot + + Portage can not figure out update path from this case: + + !!! Multiple package instances within a single package slot have been pulled + !!! into the dependency graph, resulting in a slot conflict: + + not-broken/pkg1-subslot:0 + + (not-broken/pkg1-subslot-1:0/1::test_repo, ebuild scheduled for merge) pulled in by + not-broken/pkg1-subslot (Argument) + =not-broken/pkg1-subslot-1:= required by (ebuild-test/RDEPEND-any-of-slotop:0/0::test_repo, installed) + ^ ^^ + + (not-broken/pkg1-subslot-0:0/0::test_repo, installed) pulled in by + =not-broken/pkg1-subslot-0:0/0= required by (ebuild-test/RDEPEND-any-of-slotop:0/0::test_repo, installed) + ^ + + -- cgit v1.2.3-65-gdbad