Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New config option buildconfig.test_version_suffix #502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

praiskup
Copy link
Member

If configured like

$ cat .tito/tito.props
[buildconfig]
test_version_suffix = .tito.git

The tito build --test ... NEVRA is always higher than the NEVRA of released RPMs.

Fixes: #460

If configured like

    $ cat .tito/tito.props
    [buildconfig]
    test_version_suffix = .tito.git

The `tito build --test ...` NEVRA is always higher than the NEVRA of
released RPMs.

Fixes: rpm-software-management#460
@praiskup praiskup mentioned this pull request Sep 27, 2024
Copy link
Member

@FrostyX FrostyX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test it in action but the code looks good to me. Except for that one EPEL7 thing. Thank you very much for the PR.

m = re.match(r'^(\s*Version:\s*)(.+?)\s*$', line)
if m:
print(f"{m.group(1)}{m.group(2)}{version_suffix}")
continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, do we still care about EPEL7? Anyway, it's easy not to break the backward compatibility here.

Compiling /builddir/build/BUILDROOT/tito-0.6.26-1.20240927180525922719.pr502.2.g9069fc1.el7_9.x86_64/usr/lib/python2.7/site-packages/tito/common.py ...
  File "/usr/lib/python2.7/site-packages/tito/common.py", line 611
    print(f"{m.group(1)}{m.group(2)}{version_suffix}")
                                                    ^
SyntaxError: invalid syntax

Can you please use the .format syntax?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The tito build --{s,}rpm --test should have higher NVR than the system wide package
2 participants