Changes

Package dependencies

1,947 bytes added, 14:51, 18 August 2009
Removed old outdated information, updated the 'depend' information and added 'chain' information
Packages can depend on each other (i.e., you have to install Firefox before installing some Firefox plugin etc.).
 
There are two types of dependencies:
 
<div style="margin-left: 30px">
'''depend''' - depends the current package to another specified package.
 
'''chain''' - chains another specified package to this package.
</div>
 
== Depending a package ==
By using '''depend''' you make a package depending on another package, meaning that this package needs the other package for correct functionality. This dependency can already be needed during the installation or upgrade, therefore a dependency is always installed right ''before'' the current package independently of the priority of the packages.
The format is very simple, and similar to the one used for [[profile dependencies]]
The example used in [[Packages.xml]] has been modified to make it dependent on another package called "other-package":
<presource lang="xml">
<packages>
<package
revision="1"
reboot="false"
priority="0"> <dependspackage-id="other-package"/...</source> In this example the dependency makes that "other-package" is installed right ''before'' the current package "wpkg1". == Chaining a package ==By using '''chain''' you ''chain'' a package to the current package, meaning that if this package is installed, the other package also has to be installed but right ''after'' the current package independently of the priority of the packages. The example used in [[Packages.xml]] has been modified to make it chain another package called "other-package":<source lang="xml"><packages><packageid="wpkg1"name="Windows Packager sample 1"revision="1"reboot="false"priority="0"> <chain package-id="other-package" /> 
...
</presource>
Note In this example the chain makes that "other-package dependencies" are now defined differently than in 0.9.6 and 0.9.7; this previous format is not supportedinstalled right ''after'' the current package "wpkg1".
A description from wpkgIn fact it would be exactly the same if "other-users mailing list by Drpackage" would be depending on this package "wpkg1". Frank Lee:<pre>The 'dependancy' just adds the But with some packages to the list, which is then installed in order it may be more logical and even more practical by chaining another package instead of priority. If 'foo' depends on 'bar' being present for 'foo' to install properly, 'bar' ought to have a higher priority than 'foothe other package's dependant.
In the For example above, B should be set at if you have a higher priority than A package "Gimp" for successthe application "The Gimp" and a package "GimpHelp" containing the Help files of the application. (I usually have 900-999 And you want "GimpHelp" always installed together with "Gimp". The "GimpHelp" package depends on "Gimp" as the priority for OS patchesit needs a Gimp installation before it can be installed, 700-799 for antivirus etc, 500-599 for so you could use 'mission criticaldepend' applications, 300-399 for useful things and 100-199 for end-user things like officein the "GimpHelp" package. Even numbered centuries are But in this case it is more logical to 'reserved for future expansionchain'"GimpHelp" to "Gimp" as it will be "Gimp" that you would want to assign to a profile...)</pre>
See also "Priority vs Dependancy -- Order of Installation" thread:<br />http://listsIn general the best practice is that if some main package needs certain other packages (containing components, libraries, frameworks, .wpkg.org/pipermail/wpkg.) to be able to work, that main package should depend on the needed other packages.But if (maybe due to a company policy) the main package always needs to be extended with certain packages (help-users/2007-November/threadfiles, clipart, ...), then you should chain the extending packages from the main package. Be ware that if you don't want certain application extensions to be installed always (for example firefox developer extensions), you should not chain them from the main package, but let them depend on the main package and then assign them individually to the profiles where needed.html#2000
[[category:Documentation]]
Anonymous user