Skip to content

Fix deb package version field #3157

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from easybuild.tools.package.package_naming_scheme.pns import PackageNamingScheme
from easybuild.tools.version import VERSION as EASYBUILD_VERSION


class EasyBuildPNS(PackageNamingScheme):
"""Class implmenting the default EasyBuild packaging naming scheme."""

Expand All @@ -50,4 +49,4 @@ def version(self, ec):
# cfr. http://rpm.org/ticket/56,
# https://debian-handbook.info/browse/stable/sect.manipulating-packages-with-dpkg.html (see box in 5.4.3)
ebver.replace('dev', '~dev')
Copy link
Member

@ocaisa ocaisa Jan 15, 2020

Choose a reason for hiding this comment

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

I'm no expert here but shouldn't we somehow concat this with the change below so the function returns either 4.x.x~eb or 4.x.x~ebdev...or is it ok to have 2 ~?

Copy link
Author

Choose a reason for hiding this comment

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

Good information to clarify and analyze it may be here: https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
As I understand, having two tildas is allowed. And in the case of having 4.x.x~eb and 4.x.x~dev~eb, the first one seems to be the latest

Copy link
Author

Choose a reason for hiding this comment

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

To be honest, I didn't check such form for the case of rpm packages

Copy link
Member

Choose a reason for hiding this comment

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

For me then this seems ok, but maybe @boegel should give the final ok

return 'eb-%s' % ebver
return '%s~eb' % ebver
Copy link
Contributor

Choose a reason for hiding this comment

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

What you should do is add a timestamp after the ~eb, as in ~eb-yyyymmdd to make it possible to update the eb built package automatically. Using the date_stamp = datetime.today().strftime('%Y%m%d') code from the first commit.