summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-01-08 10:21:50 +0100
committerMichał Górny <mgorny@gentoo.org>2020-01-08 10:41:07 +0100
commit0c7ca4fd8cc70fe65c0898bc2365cef5f8a22012 (patch)
tree8bacf7ffdd2599fdbeccbe2ae2759231367d5ad0
parentOptional RDEPEND policy (diff)
downloadpolicy-guide-0c7ca4fd8cc70fe65c0898bc2365cef5f8a22012.tar.gz
policy-guide-0c7ca4fd8cc70fe65c0898bc2365cef5f8a22012.tar.bz2
policy-guide-0c7ca4fd8cc70fe65c0898bc2365cef5f8a22012.zip
USE=multislot policy
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--other-metadata.rst39
1 files changed, 39 insertions, 0 deletions
diff --git a/other-metadata.rst b/other-metadata.rst
new file mode 100644
index 0000000..ddc8377
--- /dev/null
+++ b/other-metadata.rst
@@ -0,0 +1,39 @@
+Other metadata variables
+========================
+
+.. index:: SLOT; dynamic
+.. index:: USE flags; multislot
+
+Dynamic slots (multislot flag)
+------------------------------
+:Source: QA (inferred from PMS)
+:Reference: https://wiki.gentoo.org/index.php?title=Project:Quality_Assurance/Policies&oldid=109991#multislot.2FUSE-dependent_SLOT
+:Reported: ``use`` in global scope triggers fatal error
+
+The use of ``multislot`` to alter ``SLOT`` values (as well as any other
+USE-dependent slot values) in the Gentoo repository is forbidden.
+Such a feature can be used in overlays, and it is acceptable to provide
+such support in eclasses as long as it is not used in ::gentoo.
+
+This policy has been explicitly declared in response to historical
+(pre-2016) use of ``USE=multislot`` in toolchain ebuilds. When the flag
+was disabled, all package versions used the same slot, and upgrades were
+handled as for non-slotted packages. When the flag was enabled, each
+version used a separate slot, permitting multiple versions being
+installed simultaneously. This allowed the user to choose between
+the two options.
+
+The original violation has been resolved by unconditionally slotting
+the packages. This permitted the users to install multiple versions
+in parallel, while removal of old versions was to be handled via
+``emerge --depclean``.
+
+*Rationale*: this feature was in direct violation of PMS `metadata
+invariance`_ requirements. It caused the cached slot value to depend
+on the state of querying the USE flag (which in turn could technically
+depend on slot, via ``package.use``). This caused undefined package
+manager behavior which could include use of unpredictable slot, cache
+invalidation or explicit errors.
+
+
+.. _metadata invariance: https://projects.gentoo.org/pms/7/pms.html#x1-600007.1