Re: Handling transition from python3-docker-compose v1 to docker-compose v2
Hi Dirk, On 19.07.22 at 16:35 Dirk Müller wrote:
I also prepared the docker-compose-switch package that upstream created to ease
Am Freitag, 1. Juli 2022, 13:29:17 CEST schrieb Johannes Kastl: the transition from v1 to v2, as the latter is only a cli-plugin for
docker and does not longer have a docker-compose binary.
It does sounds like this one (compose-switch) should have the provides/ obsoletes then.
So I would put a "Obsoletes: ... <2.0.0" into one of the new golang-based packages. This would hopefully lead to the deinstallation of the python-based v1 package.
Yes, but only if it is getting installed. In order to make it automatically installed, it needs to provide a higher version of the old package name (to make it an update candidate of the existing installed package).
The solution that seemed to work (and is reflected in the SRs) was: **docker-compose-switch** Requires: docker Requires: docker-compose >= 2.0 Requires(post): update-alternatives Requires(postun):update-alternatives # Docker Compose V2 is a major version bump release of Docker Compose. # It has been completely rewritten from scratch in Golang (V1 was in Python). Obsoletes: python2-docker-compose < 2.0.0 Obsoletes: python3-docker-compose < 2.0.0 Obsoletes: python36-docker-compose < 2.0.0 Obsoletes: python37-docker-compose < 2.0.0 Obsoletes: python38-docker-compose < 2.0.0 Obsoletes: python39-docker-compose < 2.0.0 Obsoletes: python310-docker-compose < 2.0.0 **docker-compose** Requires: docker This makes sure that both docker-compose-switch and docker-compose 2.x are being installed when replacing the python-based v1.x version. But the user can still only install docker-compose without the compatibility package. -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
participants (1)
-
Johannes Kastl