From 78a2d6dd6a92a00c54d6efed286b2b78fb5360a0 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mar 07 2019 17:05:24 +0000 Subject: Make the text about "application independence" generally applicable The existing text had a very narrow scope: packages that contain a .desktop file that does not have the line `+NoDisplay=true+`. But the same rule applies to pretty much everything. Let's change "application" to "package" to generalize this. Also, a text which specifies when Recommends and when the other dependency types should be used is added. This partially answers the question about "modularity" (in the sense of package independence) raised in https://pagure.io/fesco/issue/2040. --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index e75a079..f6b0c03 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -72,21 +72,25 @@ on only the library and not the associated application(s). Installing an application that depends on a library or service should not automatically pull in other applications associated with that library or service. -=== Application Independence +== Package Independence + +Packages SHOULD be installable independently whenever this is technically feasible, +but they MUST specify dependencies of correct type on other packages if necessary, +see <> below. + +Desktop applications MUST NOT depend on other desktop applications unless strictly required. +In particular, packages that contain a visible `.desktop` file (a `.desktop` file that does not contain the line +`+NoDisplay=true+`) SHOULD NOT have a `Requires`, `Recommends`, or `Supplements` +on any other package containing a visible desktop file, directly or indirectly. -Applications SHOULD be installable independently whenever this is technically feasible. -Packages that contain a visible .desktop file (a .desktop file that does not contain the line -`+NoDisplay=true+`) SHOULD NOT have a Requires, Recommends, or Supplements -on any other package containing a visible desktop file, directly or indirectly, unless the -dependency is required for technical reasons or truly makes sense to have. For example, it would be reasonable for a video game level editor to require the associated video game in order to function, or for an application's plugin to require the associated application. But it would not be reasonable for an application that happens -to use a database library to depend on a database management application associated +to use a database library to depend on a database management suite associated with that library, or for an application that happens to use a particular programming language to depend on management tools associated with that programming language. -If a source package provides multiple desktop applications, those +If a source package provides multiple graphical applications, those applications SHOULD be packaged in separate subpackages when feasible. == Spec Files @@ -335,6 +339,16 @@ Versioned dependencies (build-time or runtime) SHOULD ONLY be used when actually A versioned dependency on a package with a defined Epoch MUST be included in that dependency. Otherwise the dependency will not function as expected. +=== Dependency types + +`Requires` MUST be used if the dependency is required for the software to function correctly. + +If the package functions correctly but in diminished capacity, then +`Recommends` or `Suggests` SHOULD be used. +If the functionality should be available by default for users, `Recommends` SHOULD be used, and `Suggests` otherwise. +Alternatively, the reverse dependencies `Supplements` or `Enhances` may be used in the other package. +See xref:WeakDependencies.adoc[Packaging:WeakDependencies] for guidelines on using those dependency types. + === Architecture-specific Dependencies A dependency is made arch-specific by appending the macro `+%{?_isa}+` to the package name. For example: @@ -362,10 +376,6 @@ This means that gtk+-devel should contain `+Requires: glib-devel%{?_isa} libXi-devel%{?_isa} libXext-devel%{?_isa} libX11-devel%{?_isa}+` -=== Weak dependencies - -Weak dependencies (`+Recommends:+`, `+Suggests:+`, `+Supplements:+` and `+Enhances:+`) MAY be used to specify relationships between packages which are less strict than mandatory requirements. Please see xref:WeakDependencies.adoc[Packaging:WeakDependencies] for guidelines on using these tags. - === Rich/Boolean dependencies Packages MAY make full use of the http://rpm.org/user_doc/boolean_dependencies.html[rich (or Boolean) dependency feature] supported in RPM.