Dependency Resolution
Dependency resolution in DPM is fairly straight forward. DPM reads the DEPENDENCIES
file from the package’s metadata and then checks if a file whose NAME
, PROVIDES
, or REPLACES
entries name a package with a version met by that named dependency.
The DON repository metadata provides larger dependency chains for larger package transactions, such as in the event of system updates are large framework installations, and this will be discussed more in the specification for DON.
In DPM, the behaviour is very simple if a dependency is not found: it will fail, unless an override switch to force the transaction is supplied.
Dependency Version Comparison Resolution
Version comparison will be an implementation of the behaviour documented in the public Semantic Versioning 2.0 (SemVer) specification, with a default patch number of 0 that increments with every official package created for that package version. So, if a typo is identified or some other change is made to the package, it increments by 1. If a backwards compatible patch is applied, it increments by 1 if it hasn’t already. The patch here is used to indicate package versions of the same software version, and not necessarily patching state.
If a software’s versioning scheme does not align with SemVer, it will be converted to a form that is, and this will be noted in the package description.
File Conflict Resolution
While undesired, it is possible for package creators to create more than one package that provides a file.
- For instance, if
PackageA
is installed and provides a file at$file_path
, andPackageB
is being attempted to be installed and provides a different (or even the same) file at the same$file_path
, this will create a file conflict.
In this installation file conflict, DPM detects that$file_path
is already owned byPackageA
. DPM will then fail with an error that names the conflicting file, and which package (PackageA
) owns it. It will identify the package (PackageB
) that is trying to additionally provide it. - There are exceptions. In the event that
PackageB
listsPackageA
in itsREPLACES
metadata, then it will replace the file along with any other files inPackageA
and PackageA will be removed. This handles legitimate cases where one package is meant to replace another. - Another exception is if the user supplies a commandline option to force installation of PackageB:
IfPackageA
lists the file asnon-controlled
andPackageB
lists the file asnon-controlled
, it will place the file fromPackageB
at${file_path}.dpmnew
.
IfPackageA
lists the file ascontrolled
, andPackageB
lists the file asnon-controlled
, the original file will be preserved andPackageB
will place the file at${file_path}.dpmnew
.
IfPackageA
lists the file asnon-controlled
, andPackageB
lists the file ascontrolled
, the original file at${file_path}
will be renamed to${file_path}.dpmbackup
andPackageB
‘s version will take ownership priority of the file at the conflicting path.
If both packages list the file as controlled, the transaction will fail as described in (1). The user must uninstallPackageA
and installPackageB
or one of the packages must be modified and (re)installed to allow installation without a package conflict.