Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package
obs-service-replace_using_package_version for openSUSE:Factory checked in at
2026-02-06 21:29:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-replace_using_package_version
(Old)
and
/work/SRC/openSUSE:Factory/.obs-service-replace_using_package_version.new.1670
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-replace_using_package_version"
Fri Feb 6 21:29:51 2026 rev:10 rq:1330421 version:0.0.12
Changes:
--------
---
/work/SRC/openSUSE:Factory/obs-service-replace_using_package_version/obs-service-replace_using_package_version.changes
2024-11-05 15:39:26.662110650 +0100
+++
/work/SRC/openSUSE:Factory/.obs-service-replace_using_package_version.new.1670/obs-service-replace_using_package_version.changes
2026-02-06 21:29:53.193056050 +0100
@@ -1,0 +2,10 @@
+Mon Jan 26 13:18:46 UTC 2026 - [email protected]
+
+- Update to version 1769433269.171420f:
+ * Bump version: 0.0.11 → 0.0.12
+ * Add an option to parse the release
+ * Bump actions/setup-python from 6.1.0 to 6.2.0
+ * Bump actions/cache from 4 to 5
+ * Bump actions/setup-python from 6.0.0 to 6.1.0
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-replace_using_package_version.spec ++++++
--- /var/tmp/diff_new_pack.bnjIB8/_old 2026-02-06 21:29:55.117136776 +0100
+++ /var/tmp/diff_new_pack.bnjIB8/_new 2026-02-06 21:29:55.129137279 +0100
@@ -1,7 +1,7 @@
#
# spec file for package obs-service-replace_using_package_version
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define service replace_using_package_version
Name: obs-service-%{service}
-Version: 0.0.11
+Version: 0.0.12
Release: 0
Summary: An OBS service: Replaces a regex with the version value of a
package
License: GPL-3.0-or-later
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.bnjIB8/_old 2026-02-06 21:29:55.601157083 +0100
+++ /var/tmp/diff_new_pack.bnjIB8/_new 2026-02-06 21:29:55.645158929 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/openSUSE/obs-service-replace_using_package_version.git</param>
- <param
name="changesrevision">6c2bf3a805028b1555eac71ac545d9dddfdfc857</param></service></servicedata>
+ <param
name="changesrevision">171420f373a27502ceab0a003eb6f6a45f8acf22</param></service></servicedata>
(No newline at EOF)
++++++ replace_using_package_version.py ++++++
--- /var/tmp/diff_new_pack.bnjIB8/_old 2026-02-06 21:29:55.833166817 +0100
+++ /var/tmp/diff_new_pack.bnjIB8/_new 2026-02-06 21:29:55.857167824 +0100
@@ -57,8 +57,11 @@
'minor': r'^(\d+(\.\d+){0,1})',
'patch': r'^(\d+(\.\d+){0,2})',
'patch_update': r'^(\d+(\.\d+){0,3})',
- 'offset': r'^(?:\d+(?:\.\d+){0,3})[+-.~](?:git|svn|cvs)(\d+)'
+ 'offset': r'^(?:\d+(?:\.\d+){0,3})[+-.~](?:git|svn|cvs)(\d+)',
+ 'release':
r'^(\d+(\.\d+){0,3}([+-.~](?:git|svn|cvs)([\d\w]+))?\-\d+(\.\d+){0,2})', #
noqa: E501
+ 'release_increment':
r'^(\d+(\.\d+){0,3}([+-.~](?:git|svn|cvs)([\d\w]+))?\-\d+(\.\d+){0,3})', #
noqa: E501
}
+allowed_version_regex = version_regex.keys()
obsinfo_regex = r'version: (.+)'
@@ -131,16 +134,20 @@
if command_args['--package']:
parse_version = command_args['--parse-version']
version = find_package_version(command_args['--package'], rpm_dir)
- if parse_version and parse_version not in version_regex.keys():
- raise Exception((
- 'Invalid value for this flag. Expected format is: '
- '--parse-version=[major|minor|patch|patch_update|offset]'
- ))
- elif parse_version:
- version = find_match_in_version(
- version_regex[parse_version], version
- )
- replacement = version
+
+ if parse_version is not None:
+ if parse_version not in allowed_version_regex:
+ raise Exception(
+ f"Invalid value '{parse_version}' for --parse-version "
+ f"flag. Expected: {allowed_version_regex}"
+ )
+ else:
+ replacement = find_match_in_version(
+ version_regex[parse_version], version
+ )
+ else:
+ # drop %RELEASE to keep compatibility
+ replacement = version.rsplit("-", 1)[0]
else:
replacement = command_args['--replacement']
@@ -254,7 +261,7 @@
def get_pkg_version_from_rpm(rpm_file: str) -> str:
command = [
- 'rpm', '-qp', '--queryformat', '%{VERSION}', rpm_file
+ 'rpm', '-qp', '--queryformat', '%{VERSION}-%{RELEASE}', rpm_file
]
return run_command(command)
@@ -268,7 +275,7 @@
def get_pkg_version(package: str) -> str:
command = [
- 'rpm', '-q', '--queryformat', '%{VERSION}', package
+ 'rpm', '-q', '--queryformat', '%{VERSION}-%{RELEASE}', package
]
return run_command(command)