[wpkg-users] Variable Dependencies
Rainer Meier
r.meier at wpkg.org
Mon Jun 15 15:35:37 CEST 2009
Hi Charles,
Charles Gargent wrote:
> I have a package for PowershellCX which is platform independant. How
> can I specify Powershell as a dependency when I have a package for
> Powershell XP and a package for Powershell 2K3. I could make 2
> packages for PowershellCX the only difference between them being the
> dependancy node, but is there a neater way of doing it? I dont want to
> use the chained command because there may be some instances where I
> dont want PowershellCX installed, and when I remove Powershell I want
> PowershellCX to be removed aswell.
What you're looking for is a concept called "virtual dependencies" where
packages can provide virtual functionality and others depending on them. This is
currently not supported with WPKG and it's not easy to extend such a
functionality in the current architecture.
That's one reason I usually try to have one package for one piece of software
only. For example I would have only one single "Powershell" package where the
package commands are smart enough (for example using simple scripts) to detect
if they run on XP or 2k3 and therefore install correctly on either of them. This
is usually quite easy to be done. For example there are different installers for
IE8 on XP and Vista too and I simply have one single "internetexplorer" package
which is smart enough to run the right commands on either of the Windows versions.
So if you really want to have independent packages for different OS (Powershell)
then you need to separate the packages which depend on it as well (exactly as
you suggested you would need PowershellCX-XP and PowershellCX-2K3).
Alternatively you might use "lazy" binding by just providing higher priority to
the basic "Powershell" install package and then just make sure both packages
(Powershell + PowershellCX) are assigned to the same host - this makes sure
Powershell is installed before PowershellCX.
br,
Rainer
More information about the wpkg-users
mailing list