User:Till/Conflicts Splitting Draft

From FedoraProject

< User:Till(Difference between revisions)
Jump to: navigation, search
(Splitting Packages: use <code>)
(Add bit about Requires and clarify usage of "original version" a little)
 
Line 3: Line 3:
 
{{Anchor|SplittingPackages}}
 
{{Anchor|SplittingPackages}}
 
=== Splitting Packages ===
 
=== Splitting Packages ===
If contents from one package are split into a different package, the new package usually contains files that also appear in the original package, which might lead to a implicit conflict between the new package and the original package. Therefore the newly created package should add a <code>Conflicts: original-package <= NEVR_BEFORE_SPLIT</code> to make this conflict explicit. Also the original-package should be updated to not contain the conflicting files anymore and to depend on the new package at least in all stable Fedora releases. This allows to install the latest releases of both packages without any problem. Only in case the new package is installed and the original package was installed previously and is not updated, a conflict will result.
+
If contents from one package are split into a separate package the new package usually contains files that also appear in the original package which might lead to a implicit conflict between the files in the new package and the original package. Where the new package depends on the original package, this can be resolved with a versioned Requires:
 +
<pre>
 +
# In the new package's spec file:
 +
Requires: original-package > EVR_BEFORE_SPLIT
 +
</pre>
 +
 
 +
If the new package should be installable independently of whether the original package is installed, a versioned conflict is allowed:
 +
<pre>
 +
# In the new package's spec file:
 +
Conflicts: original-package <= EVR_BEFORE_SPLIT
 +
</pre>
 +
 
 +
In both of these cases, the new version of the original package should be updated to not contain the conflicting files and to depend on the new package (at least in all stable Fedora releases). This allows to install the latest releases of both packages without any problem. The Conflicts are only there to resolve the case where the new package is installed and the older version of the original package was already installed.

Latest revision as of 16:45, 25 July 2013

[edit] Acceptable Uses of Conflicts:

[edit] Splitting Packages

If contents from one package are split into a separate package the new package usually contains files that also appear in the original package which might lead to a implicit conflict between the files in the new package and the original package. Where the new package depends on the original package, this can be resolved with a versioned Requires:

# In the new package's spec file:
Requires: original-package > EVR_BEFORE_SPLIT

If the new package should be installable independently of whether the original package is installed, a versioned conflict is allowed:

# In the new package's spec file:
Conflicts: original-package <= EVR_BEFORE_SPLIT

In both of these cases, the new version of the original package should be updated to not contain the conflicting files and to depend on the new package (at least in all stable Fedora releases). This allows to install the latest releases of both packages without any problem. The Conflicts are only there to resolve the case where the new package is installed and the older version of the original package was already installed.