[wpkg-users] Conditional installation of a package

Johannes.Brix at evidian.com Johannes.Brix at evidian.com
Thu Sep 4 15:21:47 CEST 2008


Hello Rainer,

let me explain my scenario:
I have a bunch of different user groups: students, secretaries,
consultants, managers, developers, support people.
I created a hierachy in the profiles:
   1st  level: I grouped packages
   2nd level: I grouped the packages for my different usergroups.

This works fine, but now, one user got a new notebook with Vista and there
are two applications, which do not work
or which are no longer neccessary.

My idea was to check in the application package if the OS is Vista and then
not to install the package.
---

An other case is that all applications we use can be installed on a PC with
XP german on it.
But from time to time, our support needs to setup PCs in english or french,
and there are some applications
which cannot be installed in them.
Everythime the update is running, it tries again to install this package,
but fails.

So, if I can state not to install a package if the language is not german,
would be extremely helpfull.
--
And creating additional profiles for each exception would result in an
unmanagable number of profiles,
which we had before you added the "dependency" feature.

I hope, this makes my question more clear.

br,
Johannes



|---------+---------------------------->
|         |           Rainer Meier     |
|         |           <r.meier at wpkg.org|
|         |           >                |
|         |                            |
|         |           04.09.2008 14:29 |
|         |                            |
|---------+---------------------------->
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                                                  |
  |       An:       Johannes.Brix at evidian.com                                                                                                        |
  |       Kopie:    wpkg-users at lists.wpkg.org                                                                                                        |
  |       Thema:    Re: [wpkg-users] Conditional installation of a package                                                                           |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|




Hi Johannes,

Johannes.Brix at evidian.com wrote:
> Hello,
>
> I just began working with WPKG one month ago. And in the meanwhile, I
have
> a bunch of questions.
> Here is the first one:
>
> Is it possible to NOT install a package under some conditions like other
> installed programs, OS level
> and so on?

In general an administrator knows which OS is running on a machine. In
addition most administrators try to keep their machines in a small
number of "device classes" - like "Windows XP clients", "Windows Vista
clients" or similar. Therefore I suggest creating a profile for each of
these profiles. I usually create a profile hierarchy:

- company-global (packages which are installed on _all_ machines and
operating systems)

- company-xp (xp-only packages, only applied to XP system. The profile
depends on the global profile and therefore automatically includes all
its packages. Usually there is only a very very limited number of
packages within this profile)

- company-vista (vista-only packages, only applied to Vista systems. The
profile depends on the global profile and therefore automatically
includes all its packages. Usually there is only a very very limited
number of packages within this profile)


A similar profile structure might be applies in your case.


In addition the latest WPKG 1.1.x milestone release contains a new type
of checks: "execute" checks.
This allows to execute an external check script (for example a cmd
script). This script could return 0 (package installed properly) on
systems where you do not want to apply the package at all. This makes
WPKG think that it is already installed on the system and it will
neither execute the install nor the update commands.

Unfortunately it will still apply the "update" commands when you
increase the package version number at a later stage. So this is not a
solution for every case.

Still the best solution not to apply a package to a specific host is not
to include it to the profile assigned to the host.
There are also no plans to change this since such "conditions" would be
quite complex an WPKG would require to check all this conditions on each
run. e.g.
- check if package is installed
- not installed?
   - run all pre-condition checks
   - do not apply the package

It sounds quite silly to me to assign a package to a host which should
not be installed on the host actually.

Most pre-conditions include pre-requirements to the package (like
software xy needs Java runtime installed). These can be resolved by
package dependencies. So the pre-requirements are met before the package
is actually applied.


br,
 Rainer







More information about the wpkg-users mailing list