{"id":386,"date":"2025-02-09T19:41:18","date_gmt":"2025-02-10T00:41:18","guid":{"rendered":"https:\/\/dpm.darkhorselinux.org\/?page_id=386"},"modified":"2025-02-10T00:17:06","modified_gmt":"2025-02-10T05:17:06","slug":"dpm-dependency-resolution","status":"publish","type":"page","link":"https:\/\/dpm.darkhorselinux.org\/?page_id=386","title":{"rendered":"DPM Conflict Resolutions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Dependency Resolution<\/h2>\n\n\n\n<p>Dependency resolution in DPM is fairly straight forward.  DPM reads the <code>DEPENDENCIES<\/code> file from the package&#8217;s metadata and then checks if a file whose <code>NAME<\/code>, <code>PROVIDES<\/code>, or <code>REPLACES<\/code> entries name a package with a version met by that named dependency.<\/p>\n\n\n\n<p>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. <\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dependency Version Comparison Resolution<\/h2>\n\n\n\n<p>Version comparison will be an implementation of the behaviour documented in the public <a href=\"https:\/\/semver.org\/\" data-type=\"link\" data-id=\"https:\/\/semver.org\/\">Semantic Versioning 2.0<\/a> (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&#8217;t already.  The patch here is used to indicate package versions of the same software version, and not necessarily patching state.<\/p>\n\n\n\n<p>If a software&#8217;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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">File Conflict Resolution<\/h2>\n\n\n\n<p>While undesired, it is possible for package creators to create more than one package that provides a file.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>For instance, if <code>PackageA<\/code> is installed and provides a file at <code>$file_path<\/code>, and <code>PackageB<\/code> is being attempted to be installed and provides a different (or even the same) file at the same <code>$file_path<\/code>, this will create a file conflict.<br><br>In this installation file conflict, DPM detects that <code>$file_path<\/code> is already owned by <code>PackageA<\/code>. DPM will then fail with an error that names the conflicting file, and which package (<code>PackageA<\/code>) owns it. It will identify the package (<code>PackageB<\/code>) that is trying to additionally provide it. <br><br><\/li>\n\n\n\n<li>There are exceptions. In the event that <code>PackageB<\/code> lists <code>PackageA<\/code> in its <code>REPLACES<\/code> metadata, then it will replace the file along with any other files in <code>PackageA<\/code> and PackageA will be removed. This handles legitimate cases where one package is meant to replace another.<br><br><\/li>\n\n\n\n<li>Another exception is if the user supplies a commandline option to force installation of PackageB:<br><br>If <code>PackageA<\/code> lists the file as <code>non-controlled<\/code> and <code>PackageB<\/code> lists the file as <code>non-controlled<\/code>, it will place the file from <code>PackageB<\/code> at <code>${file_path}.dpmnew<\/code>. <br><br>If <code>PackageA<\/code> lists the file as <code>controlled<\/code>, and <code>PackageB<\/code> lists the file as <code>non-controlled<\/code>, the original file will be preserved and <code>PackageB<\/code> will place the file at <code>${file_path}.dpmnew<\/code>.<br><br>If <code>PackageA<\/code> lists the file as <code>non-controlled<\/code>, and <code>PackageB<\/code> lists the file as <code>controlled<\/code>, the original file at <code>${file_path}<\/code> will be renamed to <code>${file_path}.dpmbackup<\/code> and <code>PackageB<\/code>&#8216;s version will take ownership priority of the file at the conflicting path.<br><br>If both packages list the file as controlled, the transaction will fail as described in (1). The user must uninstall <code>PackageA<\/code> and install <code>PackageB<\/code> or one of the packages must be modified and (re)installed to allow installation without a package conflict.<\/li>\n<\/ol>\n<div class=\"pdfprnt-buttons pdfprnt-buttons-page pdfprnt-bottom-right\"><a href=\"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F386&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\" ><span class=\"pdfprnt-button-title pdfprnt-button-pdf-title\">[ EXPORT TO PDF ]<\/span><\/a><a href=\"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F386&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\" ><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>Dependency Resolution Dependency resolution in DPM is fairly straight forward. DPM reads the DEPENDENCIES file from the package&#8217;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 &hellip; <a href=\"https:\/\/dpm.darkhorselinux.org\/?page_id=386\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">DPM Conflict Resolutions<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-386","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=\/wp\/v2\/pages\/386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":17,"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=\/wp\/v2\/pages\/386\/revisions"}],"predecessor-version":[{"id":416,"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=\/wp\/v2\/pages\/386\/revisions\/416"}],"wp:attachment":[{"href":"https:\/\/dpm.darkhorselinux.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}