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

Fixup regexes for version extraction #66

Merged
merged 2 commits into from
Jul 17, 2019
Merged

Conversation

mikaelarguedas
Copy link
Contributor

The current regex relies on finding the package in the APT Packages file and use the following line as the version line.
This works for packages.ros.org but fails on the snapshots.ros.org repository. (the following line is Priority: extra)

This PR modifies the regex to capture all the lines until the next empty line (all the package information) and extract the version number from the multiline test block captured.

To do so I modified the version pattern to expect Version: at the beginning of the line, and the package pattern to capture until the next empty line (\n\n)

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@ruffsl
Copy link
Member

ruffsl commented Jul 17, 2019

Will you be making changes to the templates to afford changing over the docker image to snapshots as they reach EOL? It'd be nice to be able to swap the config folder the manifest points to, like we do for legacy vs non-legacy, to migrate the CI generation to check snapshot respo instead.

@mikaelarguedas
Copy link
Contributor Author

Yeah that's my goal. One thing I'm not a fan of about the "changing the config files" is the potential for code duplication as well as handling discrepancy within a ROS distro (e.g. zesty is EOL but not xenial so they won't use the same apt repo).
I opened osrf/docker_images#281 a couple weeks back to discuss ways of doing this. I'll update it soon based on my recent findings (e.g. I forgot the APT repo was hardcoded in the docker_templates scripts).

I'm currently thinking of homogenizing the templates to avoid duplication but without the extra logic necessary for active distros to use the snapshots repository.
This is still WIP but I'm working on this PR #67

@mikaelarguedas
Copy link
Contributor Author

As this is backward compatible and won't change the content of the generated dockerfiles I'll go ahead and merge this incremental improvement.
I'll update the higher level issue and PR as progress is made on the overall switch to the snapshot repository

@mikaelarguedas mikaelarguedas merged commit 8ce46b4 into master Jul 17, 2019
@mikaelarguedas mikaelarguedas deleted the support-snapshots branch July 17, 2019 17:04
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.

2 participants