Python version is now in macro

This commit is contained in:
2022-07-22 12:34:11 +02:00
parent 64567d4755
commit 6f2704d8eb

View File

@@ -10,7 +10,7 @@
%global __arch_install_post /usr/lib/rpm/check-buildroot %global __arch_install_post /usr/lib/rpm/check-buildroot
# Macros # Macros
%define pyversion 3.8 %define pyversion /usr/bin/python3.8
%define name polemarch %define name polemarch
%define shortname polemarch %define shortname polemarch
%define namebase polemarch %define namebase polemarch
@@ -87,8 +87,9 @@ exit 0
%post %post
%systemd_post %{name}.service %systemd_post %{name}.service
update-alternatives --set python %{pyversion}
sudo -u %{user} /opt/%{name}/bin/%{shortname}ctl migrate sudo -u %{user} /opt/%{name}/bin/%{shortname}ctl migrate
update-alternatives --set python /usr/bin/python3.8
%preun %preun
%systemd_preun %{name}.service %systemd_preun %{name}.service