diff --git a/scripts/obs/lib/__init__.py b/scripts/obs/lib/__init__.py index 964b2983..9682b19c 100644 --- a/scripts/obs/lib/__init__.py +++ b/scripts/obs/lib/__init__.py @@ -63,6 +63,10 @@ def add_shared_arguments(parser): parser.add_argument("-v", "--verbose", action="store_true", help="always print shell commands and their output," " instead of only printing them on error") + parser.add_argument("-e", "--version-append", + help="add a string at the end of the version, e.g." + " '~osmocom' for the wireshark package to" + " indicate that it is the version from our repo") def set_cmds_verbose(new_val): diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py index 5dbc862c..a58ae15d 100644 --- a/scripts/obs/lib/srcpkg.py +++ b/scripts/obs/lib/srcpkg.py @@ -136,15 +136,21 @@ def write_commit_txt(project): def build(project, gerrit_id=0): conflict_version = lib.args.conflict_version feed = lib.args.feed + version_append = lib.args.version_append + lib.git.clone(project) lib.git.clean(project) if gerrit_id > 0: lib.git.checkout_from_review(project, gerrit_id) else: checkout_for_feed(project) + version = get_version_for_feed(project) + if version_append: + version += version_append epoch = get_epoch(project) version_epoch = f"{epoch}:{version}" if epoch else version + has_rpm_spec = lib.rpm_spec.get_spec_in_path(project) is not None print(f"{project}: building source package {version_epoch}")