Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 2019 14:47:17 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Matthias Fechner <idefix@fechner.net>
Cc:        ports@freebsd.org
Subject:   Re: How to use @preexec to test for installed packages
Message-ID:  <20190419124716.wfyja56l5lp6rtis@ivaldir.net>
In-Reply-To: <16553fab-03af-9942-93e2-7ebb116487a9@fechner.net>
References:  <16553fab-03af-9942-93e2-7ebb116487a9@fechner.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--v75lamczd6q7np6h
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 06, 2019 at 03:58:48PM +0200, Matthias Fechner wrote:
> Dear all,
>=20
> as pkg cannot handle CONFLICTS_INSTALL I tried now to implement this as
> a preinstall command using @preexec in pkg-plist.
>=20
> The command should check if a package is installed and stop the
> installation or continue if the package is not installed.
>=20
> 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
>=20
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 reas=
on to
register a conflict here. It is on purpose that pkg only check for conflict=
ing
files, until now no cases justified yet any other case of conflict to be ha=
ndled
by pkg. (If that ever happen then we will implement a conflict handling
solution).

Best regards,
Bapt

--v75lamczd6q7np6h
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAly5w1EACgkQY4mL3PG3
PloSag//Zy7DmQhvzLYKJBjN7lWL2S4nb4bsJ1rHyxbVqNLQx5a4cKcVtigfzdhN
zeVHQzHOAUHXEijbvcQ66WIsYF3CuvrWGPls7qiO+XMZoSkQ5qmNVjfNW0pggXVQ
QZPpczvompRPvAC97+jk95gohNjJKQ0fAuy24nPULzCyKnYTjS0cAtTm6/nW0/P3
DPIFkyLbIWduA8DKoU+LF3emI0mx3M2F8hoBf7xUN/RiHVATOVO8r4RCPPmQdAPE
9F2vxqWYXxGqH7SvwoJYhUxFCBz5J0xppJpq/Vkr+oduxaPxcu1FVAT0RqZYYwUh
ycvjHLYqJR4BR+iZk13gItDeiErByGocYo4ZL8b+VMuGrTGDmGatG9e2Xk0/gMDG
SwfppGOlc5LU7moQ43SDAkh+UrW6lzMlyXqU4lnP73fnKh5ias7qYKXI+eHDUAcZ
YA3yjOyto3aT6MoF+7eFGp96PPoN8+ArFloTaX/GwxnD5GoM/aBTlyrUx3T3OcHL
wsHuScdW8ywUGrraZ89zeAteg1/3JQ60MUOfNd0JDnKfKlz0C7HOwW1rr9lUOD2e
Y6R69IXRoFgtCcDMM5888rxvromfnhJQ914v3ViLHeYTUqrPHI+TTzzlccPwy54t
FTSCcytYEnGTJTeTap/qBemv+wDl+Rv8kLbw1Xo0fM+B+hDg2aI=
=6ktk
-----END PGP SIGNATURE-----

--v75lamczd6q7np6h--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190419124716.wfyja56l5lp6rtis>