From e5671d7e9838bc8b1a39b186bdde01fb2f313899 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mar 16 2023 12:46:46 +0000 Subject: file and dir dependencies: mention explicit path dependencies, reorder The text is inverted, to list the allowed uses first, and then to exclude the unwanted ones. The text didn't mention the case where one package has an explicit Provides:/some/path and another package uses Requires|Recommends|Suggests:/some/path. Those explicit Provides are included in the primary metadata and can be used with no problem and they are sometimes useful to coordinate functionality between packages. Also, with dnf5 the split between "primary" and "filelists" metadata matters again, and the latter is not dowloaded by default. So reword the explanation a bit to discourage packagers from using it. The rule is extended to also cover directories. I suspect that the omission was just clumsy language and not intentional. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index dd32452..09f6e51 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -838,13 +838,16 @@ supported in RPM. RPM gives you the ability to depend on arbitrary files or directories instead of packages. -Packages SHOULD NOT include file dependencies -outside of the following directories: +Packages MAY include such dependencies for paths inside one of the following directories: * `+/usr/bin+` * `+/usr/sbin+` * `+/etc+` +They also MAY depend on paths listed in an explicit `Provides:`. +They SHOULD NOT include dependencies on other paths +as that requires additional repository metadata to be downloaded. + Please also note that it is not uncommon for multiple packages to provide the same directory. Directory dependencies SHOULD ONLY be used