[elbe-devel] [PATCH] elbepack: version: always mark devel version string
Eduard Krein
eduard.krein at linutronix.de
Tue Jun 25 16:35:28 CEST 2024
Am 24.06.2024 um 14:07 schrieb Thomas Weißschuh:
> The development elbe version is distinct from the release version.
> Make that clear in the version string.
> To be compatible with python packaging version string requirements,
> use the suffix '.dev0' instead of '-devel'.
>
> Only the initial initvm setup needs access to the base version, as this
> needs to install a Debian package which does not exist for devel
> versions.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
Reviewed-by: Eduard Krein<eduard.krein at linutronix.de>
> ---
> elbepack/elbexml.py | 9 ++-------
> elbepack/init/preseed.cfg.mako | 4 ++--
> elbepack/version.py | 9 ++++++---
> 3 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/elbepack/elbexml.py b/elbepack/elbexml.py
> index 175026bac1f8..2ad43a4b59f9 100644
> --- a/elbepack/elbexml.py
> +++ b/elbepack/elbexml.py
> @@ -17,7 +17,7 @@ from urllib.request import (
>
> from elbepack.treeutils import etree
> from elbepack.validate import validate_xml
> -from elbepack.version import elbe_version, is_devel
> +from elbepack.version import elbe_version
> from elbepack.xmldefaults import ElbeDefaults
>
>
> @@ -458,13 +458,8 @@ class ElbeXML:
> cdrom.set_text(abspath)
>
> def dump_elbe_version(self):
> - if is_devel:
> - ver_text = elbe_version + '-devel'
> - else:
> - ver_text = elbe_version
> -
> version = self.xml.ensure_child('elbe_version')
> - version.set_text(ver_text)
> + version.set_text(elbe_version)
>
> def get_elbe_version(self):
> if self.has('elbe_version'):
> diff --git a/elbepack/init/preseed.cfg.mako b/elbepack/init/preseed.cfg.mako
> index 092330ebd9d8..23957a3ac529 100644
> --- a/elbepack/init/preseed.cfg.mako
> +++ b/elbepack/init/preseed.cfg.mako
> @@ -3,7 +3,7 @@
> ## SPDX-FileCopyrightText: 2014-2017 Linutronix GmbH
>
> <%
> - from elbepack.version import elbe_version, elbe_initvm_packagelist
> + from elbepack.version import elbe_version_base, elbe_initvm_packagelist
> from elbepack.filesystem import size_to_int
> swap = size_to_int(prj.text('swap-size', default=defs, key='swap-size')) // 1024 // 1024
> %>
> @@ -136,7 +136,7 @@ d-i finish-install/reboot_in_progress note
> d-i pkgsel/include string rng-tools-debian \
> dbus \
> % for p in elbe_initvm_packagelist:
> - ${p}=${elbe_version}* \
> + ${p}=${elbe_version_base}* \
> % endfor
> % for n in pkgs:
> % if n.tag == "pkg":
> diff --git a/elbepack/version.py b/elbepack/version.py
> index aa3ae39d1986..02ca86c955a4 100644
> --- a/elbepack/version.py
> +++ b/elbepack/version.py
> @@ -5,7 +5,12 @@
> import pathlib
> import sys
>
> -elbe_version = '14.9.3'
> +
> +is_devel = not pathlib.Path(__file__).is_relative_to(sys.prefix)
> +elbe_version_base = '14.9.3'
> +elbe_version = elbe_version_base
> +if is_devel:
> + elbe_version += '.dev0'
>
> elbe_initvm_packagelist = ['python3-elbe-buildenv',
> 'python3-elbe-soap',
> @@ -13,5 +18,3 @@ elbe_initvm_packagelist = ['python3-elbe-buildenv',
> 'python3-elbe-daemon',
> 'elbe-schema',
> 'python3-elbe-bin']
> -
> -is_devel = not pathlib.Path(__file__).is_relative_to(sys.prefix)
>
> ---
> base-commit: 655893d3249c0ae1a23fec6f611c64aaa9a3b14e
> change-id: 20240624-dev-version-b2ef0ba87c51
> prerequisite-change-id: 20240624-version-check-a48b1f8c07d2:v2
>
> Best regards,
--
Eduard Krein
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 19; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/legal/data-protection.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br.,
HRB700 806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas
Gleixner, Tiffany Silva, Sean Fennelly, Jeffrey Schneiderman
More information about the elbe-devel
mailing list