On Sat, Apr 06, 2019 at 03:58:48PM +0200, Matthias Fechner wrote:
> Dear all,
> 
> as pkg cannot handle CONFLICTS_INSTALL I tried now to implement this as
> a preinstall command using @preexec in pkg-plist.
> 
> The command should check if a package is installed and stop the
> installation or continue if the package is not installed.
> 
> I tried it with the following command:
> @preexec `/usr/sbin/pkg -N info -e gogs`; if [ $? -eq 0 ]; then echo
> "Gitlab cannot be installed together with gogs as both of them modify
> .ssh/authorized_keys" && exit 1; else echo "Gogs not installed,
> continue."; fi
> 
There is no reason at all to prevent gitlab to be installed along side with gogs
or even gitea because they both play with .ssh/authrized_keys.

It is up to the admin to be careful about it. As an admin I may want to be able
to install both to transition from one to another.

I can also have both on the same machine, but started with different users (I
already did that in the past with gitea and gogs and they both run fine
together.

My 2cts is admins should know what they are doing here and there is no reason to
register a conflict here. It is on purpose that pkg only check for conflicting
files, until now no cases justified yet any other case of conflict to be handled
by pkg. (If that ever happen then we will implement a conflict handling
solution).

Best regards,
Bapt

Attachment: signature.asc
Description: PGP signature

Reply via email to