From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8A04D1382C5 for ; Tue, 13 Feb 2018 16:46:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DB892E09DC; Tue, 13 Feb 2018 16:46:14 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AD125E09DC for ; Tue, 13 Feb 2018 16:46:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AED83335C3C for ; Tue, 13 Feb 2018 16:46:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2EA26206 for ; Tue, 13 Feb 2018 16:46:10 +0000 (UTC) From: "Göktürk Yüksek" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Göktürk Yüksek" Message-ID: <1518540212.7266aee16fa73086a1d9553ab9129013d83a4761.gokturk@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: general-concepts/virtuals/ X-VCS-Repository: proj/devmanual X-VCS-Files: general-concepts/virtuals/text.xml X-VCS-Directories: general-concepts/virtuals/ X-VCS-Committer: gokturk X-VCS-Committer-Name: Göktürk Yüksek X-VCS-Revision: 7266aee16fa73086a1d9553ab9129013d83a4761 X-VCS-Branch: master Date: Tue, 13 Feb 2018 16:46:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1681b05c-757a-4e44-9c5a-4494dafcb1f4 X-Archives-Hash: e19602a3356140931525766fefc229ab commit: 7266aee16fa73086a1d9553ab9129013d83a4761 Author: Michał Górny gentoo org> AuthorDate: Fri Jan 12 23:23:30 2018 +0000 Commit: Göktürk Yüksek gentoo org> CommitDate: Tue Feb 13 16:43:32 2018 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7266aee1 general-concepts/virtuals: Tips on virtual and subslots general-concepts/virtuals/text.xml | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/general-concepts/virtuals/text.xml b/general-concepts/virtuals/text.xml index 4809394..ff4995a 100644 --- a/general-concepts/virtuals/text.xml +++ b/general-concepts/virtuals/text.xml @@ -70,5 +70,85 @@ RDEPEND="|| ( dev-libs/liblinux dev-libs/libbsd )" +
+Virtuals and subslots + + + +This section is only applicable if virtual providers include versions that +are ABI-compatible with one another (and use matching SONAMEs) and/or +the incompatible providers are being obsoleted. + + +

+Like regular packages, virtuals can define subslots that can be used +to trigger rebuilds of their reverse dependencies. For this to work, a new +version of the virtual is created for each subslot of the providers, +where each version contains dependencies on a specific subslot. +

+ +

+For example, a virtual for different packages providing ABI-compatible +libfoo.so.1 libraries could look like the following: +

+ + +EAPI=6 + +DESCRIPTION="Virtual for libfoo.so.1" +SLOT="0/1" + +RDEPEND=" + || ( + dev-libs/libfoo:0/1 + dev-libs/libfoo-alternate:0/1 + dev-libs/bigpack:0/libfoo-1+libbar-0 + dev-libs/bigpack:0/libfoo-1+libbar-1 + ) +" + + +

+Virtuals can also be used when one of the providers is being obsoleted in favor +of another that breaks ABI compatibility while remaining API-compatible. In this +case, multiple versions of the virtual are created, each specifying a single +provider and a unique subslot. +

+ +

+For example, if dev-libs/libfoo (libfoo.so.0) is being replaced +by dev-libs/newfoo (libfoo.so.1), virtual/libfoo-0.ebuild +would contain: +

+ + +EAPI=6 + +DESCRIPTION="Virtual for libfoo.so.0" +SLOT="0/0" +RDEPEND="dev-libs/libfoo:0/0" + + +

+while virtual/libfoo-1.ebuild would contain: +

+ + +EAPI=6 + +DESCRIPTION="Virtual for libfoo.so.1" +SLOT="0/1" +RDEPEND="dev-libs/newfoo:0/1" + + + +In this case, the package manager will naturally want to upgrade +to dev-libs/newfoo whenever possible. Therefore, this solution +is not viable if clean choice between the two providers is desired. + + + +
+