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

Use rpm.ds instead of deprecated hdr.dsFromHeader #488

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

FrostyX
Copy link
Member

@FrostyX FrostyX commented Jan 21, 2024

Fix #481
See also rpm-software-management/mock#1223

As a reproducer, I used the following releaser:

[yum]
releaser = tito.release.YumRepoReleaser
builder = tito.builder.Builder
srpm_disttag = fc39
rsync = /tmp/tito/yum-repo

and then did tito release yum.

Fix rpm-software-management#481
See also rpm-software-management/mock#1223

As a reproducer, I used the following releaser:

    [yum]
    releaser = tito.release.YumRepoReleaser
    builder = tito.builder.Builder
    srpm_disttag = fc39
    rsync = /tmp/tito/yum-repo

and then did `tito release yum`.
@FrostyX
Copy link
Member Author

FrostyX commented Jan 21, 2024

Hello @jflorian, can you please try if this fixes the issue for you?

There is this partially unrelated code

if hdr['name'] in self.new_rpm_dep_sets:
    dep_set = rpm.ds(header, rpm.RPMTAG_NEVR)
    if dep_set.EVR() < self.new_rpm_dep_sets[hdr['name']].EVR():
        print("Deleting old package: %s" % filename)
        run_command("rm %s" % os.path.join(temp_dir,
            filename))

which doesn't make sense to me and I can't trigger any deleting. Does this PR break anything that previously worked for you, please?

@FrostyX
Copy link
Member Author

FrostyX commented Jan 28, 2024

I think this PR is correct, so I will merge. Please let me know if it needs some follow-up.

@FrostyX FrostyX merged commit b9d6d2b into rpm-software-management:master Jan 28, 2024
11 checks passed
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.

AttributeError: 'rpm.hdr' object has no attribute 'dsOfHeader'
1 participant