aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-06-21 08:48:04 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2016-06-21 08:52:05 +0100
commitb4ab8d3877ab1ce7ecbefdd57c2c0f81c9de3eb3 (patch)
tree4b3fed3da33d6599b5f3a6dca66406bd2228d354
parentprofiles/categories: new 'not-broken' category for negative tests (diff)
downloadgen-b0rk-b4ab8d3877ab1ce7ecbefdd57c2c0f81c9de3eb3.tar.gz
gen-b0rk-b4ab8d3877ab1ce7ecbefdd57c2c0f81c9de3eb3.tar.bz2
gen-b0rk-b4ab8d3877ab1ce7ecbefdd57c2c0f81c9de3eb3.zip
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 <slyfox@gentoo.org>
-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>