Difference between revisions of "Package dependencies"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Clarify that the dependency code goes in the appropriate package xml file)
Line 1: Line 1:
 
Packages can depend on each other (i.e., you have to install Firefox before installing some Firefox plugin etc.).
 
Packages can depend on each other (i.e., you have to install Firefox before installing some Firefox plugin etc.).
  
The format is very simple, and similar to the one used for [[profile dependencies]]:
+
The format is very simple, and similar to the one used for [[profile dependencies]]
  
 +
The example used in [[packages]] has been modified to make it dependant on another package called  "other-package":
 +
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<packages>
 +
<package id="setadminpassword"
 +
          name="Set admin password"
 +
          revision="1"
 +
          priority="999"
 +
          reboot="false"
 +
          execute="once"
 +
          depends package-id="other-package">
 +
      <install cmd='cmd /c net user administrator password' />
 +
</package>
 +
</packages>
  
    <package id=...>
 
        <depends package-id="my-package"/>
 
        <depends package-id="other-package"/>
 
        ...
 
    </package>
 
  
 
Note that "package dependencies" are now defined differently than in 0.9.6 and 0.9.7; this previous format is not supported.
 
Note that "package dependencies" are now defined differently than in 0.9.6 and 0.9.7; this previous format is not supported.

Revision as of 15:07, 20 May 2009

Packages can depend on each other (i.e., you have to install Firefox before installing some Firefox plugin etc.).

The format is very simple, and similar to the one used for profile dependencies

The example used in packages has been modified to make it dependant on another package called "other-package":

<?xml version="1.0" encoding="UTF-8"?> <packages>

<package id="setadminpassword"
         name="Set admin password"
         revision="1"
         priority="999"
         reboot="false"
         execute="once"
         depends package-id="other-package">
      <install cmd='cmd /c net user administrator password' />
</package>

</packages>


Note that "package dependencies" are now defined differently than in 0.9.6 and 0.9.7; this previous format is not supported.


A description from wpkg-users mailing list by Dr. Frank Lee:

The 'dependancy' just adds the packages to the list, which is then 
installed in order of priority. If 'foo' depends on 'bar' being present 
for 'foo' to install properly, 'bar' ought to have a higher priority than 
'foo'.

In the example above, B should be set at a higher priority than A for 
success. (I usually have 900-999 as the priority for OS patches, 700-799 
for antivirus etc, 500-599 for 'mission critical' applications, 300-399 
for useful things and 100-199 for end-user things like office. Even 
numbered centuries are 'reserved for future expansion'...)

See also "Priority vs Dependancy -- Order of Installation" thread:
http://lists.wpkg.org/pipermail/wpkg-users/2007-November/thread.html#2000