public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/gen-b0rk:master commit in: ebuild-test/RDEPEND-slotop-any-of/
@ 2016-06-21  7:52 Sergei Trofimovich
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2016-06-21  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     b4ab8d3877ab1ce7ecbefdd57c2c0f81c9de3eb3
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 21 07:48:04 2016 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jun 21 07:52:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/proj/gen-b0rk.git/commit/?id=b4ab8d38

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 <AT> gentoo.org>

 .../RDEPEND-slotop-any-of-0.ebuild                 | 17 ++++++++++
 ebuild-test/RDEPEND-slotop-any-of/metadata.xml     | 39 ++++++++++++++++++++++
 2 files changed, 56 insertions(+)

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>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-21  7:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-21  7:52 [gentoo-commits] repo/proj/gen-b0rk:master commit in: ebuild-test/RDEPEND-slotop-any-of/ Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox