aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ebuild-test/RDEPEND-slotop-any-of/RDEPEND-slotop-any-of-0.ebuild17
-rw-r--r--ebuild-test/RDEPEND-slotop-any-of/metadata.xml39
2 files changed, 56 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<longdescription>
+ 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)
+ ^
+</longdescription>
+</pkgmetadata>