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

Accept "0" as an epoch #17

Merged
merged 1 commit into from Sep 27, 2023
Merged

Conversation

sjoerdsimons
Copy link
Contributor

In Debian an zero epoch is actually valid; e.g. woff-tools actually has a zero epoch (0:2009.10.04-2).

In Debian an zero epoch is actually valid; e.g. woff-tools actually has
a zero epoch (0:2009.10.04-2).

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
@Conan-Kudo
Copy link
Member

It is also a valid Epoch in RPM too.

@mlschroe
Copy link
Member

This is about the way libsolv normalizes the epoch-version-release. So stripping a zero epoch is correct. What exactly are you trying to solve?

@andrewshadura
Copy link

andrewshadura commented Sep 27, 2023 via email

@andrewshadura
Copy link

To clarify: without this change, when woff-tools is requested in a DoD project as a build dependency, OBS keeps downloading and deleting the package files, never satisfying the dependency (because the version doesn’t match).

@mlschroe
Copy link
Member

The reason for this is that libsolv's repo_add_deb() does not normalize the epoch as well. Hmm.

The debian packaging guide says that an empty epoch is the same as a zero epoch, so it somewhat makes sense to normalize. But I'm not a debian expert.

Anyway either perl-BSSolv or libsolv needs to change.

@Conan-Kudo
Copy link
Member

The debian packaging guide says that an empty epoch is the same as a zero epoch, so it somewhat makes sense to normalize. But I'm not a debian expert.

This is correct. From a solution solving perspective, both RPM and Debian package management expect this.

@andrewshadura
Copy link

Well, it is the same (when versions are compared), but as you pointed out, it’s not the same when it comes to the file name comparison. If you drop it in one place, but then expect it in the file name, you won’t get a match.

@Conan-Kudo
Copy link
Member

File names should be fetched by getting the basename from the URL in the repository metadata, not by constructing strings based on NEVRA.

@andrewshadura
Copy link

Probably. But apparently that’s not what happens, for whatever reason.

@Conan-Kudo
Copy link
Member

That's a bug somewhere in OBS then. :)

@andrewshadura
Copy link

Unrelated: I keep misreading your username as Conan-Sudo 😃

@mlschroe
Copy link
Member

The filename is not the problem. The OBS repo server fetches the binary correctly, but then a bit later the scheduler does not identify the binary as the evr is different, so it gets deleted again.

@mlschroe
Copy link
Member

The repo parsers in the obs-build package also leave the epoch for debian metadata. So I think the easiest way forward is to not normalize and accept the pull request.
It's still somewhat ugly and dangerous that the code in the repo metadata parser must match libsolv's package parser, but I think we have to live with that.

@mlschroe mlschroe merged commit a2ef700 into openSUSE:master Sep 27, 2023
@andrewshadura
Copy link

@mlschroe, thanks, I think was misremembering the exact nature of the issue. And thanks for merging.

@mlschroe
Copy link
Member

Sorry that this took so long. I somehow missed that you opened this pull request.

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.

None yet

4 participants