[wpkg-users] conflicts-option

Rainer Meier r.meier at wpkg.org
Tue Jan 15 10:54:37 CET 2013

Hi Peter,

On 15.01.2013 02:12, Peter Beck wrote:
> With debian packages you can define "conflicts" which is very handy.
> If there is for example apache installed it conflicts with ngnix or so.
> Is there an option in wpkg to get something similar ? Sometimes this
> would be useful if there should be just one program for a job.

In fact such a concept does not exist for WPKG due to multiple reasons (already 
discussed on the list a while ago). First of all WPKG is not a software 
repository and profiles are created by Administrators. So Administrator should 
create profiles which do not have such conflicts.

If an administrator would define conflicts and still assign apache and ngix to 
the same profile, then it's not like debian or RPM installation where during 
installation you're just warned about the conflict. WPKG would simply be forced 
into the conflict and to install both packages due to profile definition (or 
alternatively stop the complete process until an admin solves the bad profile).

Conflicts should typically not be handled on hard-coded package IDs but rather 
on some kind of "virtual" package. In the example this would require a virtual 
feature called "webserver" for example and both apache and ngix providing 
"webserver" and conflicting on "webserver" so only one can be installed. This 
would be the only clean way to define conflicts. WPKG currently does not work 
with virtual packages.

However I have in mind some kind of virtual packages which would also allow 
virtual dependencies (like "requires webserver") or similar. This would allow to 
apply any "webserver" providing package like apache or ngix to a host while the 
package depending on them could not have to depend on one of them in hard-coded 
way. However administrators would still have to assign one of these "webserver" 
package to the profile to make the profile consistent. Well, this is basically 
beyond the initial "conflicts" request.

Long story short: Conflicts are currently not handled in WPKG directly. Although 
you might be able to design your packages specifically to handle conflicts. Like 
defining checks and/or conditional commands which verify for ngix whether apache 
is installed and depending on the results cancel installation of ngix since it 
conflicts. However this will not release you from the obligation to fix the 
profile if you assigned both to a host since WPKG would (on each run) try to 
re-install ngix and fail due to the package failing on purpose.

So currently it's clearly recommended to keep your profiles clean and assure via 
profiles that conflicting packages are simply not applied to the host. But WPKG 
does not enforce this, you need to use your brain :)


More information about the wpkg-users mailing list