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

Support version specifiers in package.xml (for apt packages) #118

Open
murphm8 opened this issue Oct 15, 2019 · 2 comments
Open

Support version specifiers in package.xml (for apt packages) #118

murphm8 opened this issue Oct 15, 2019 · 2 comments

Comments

@murphm8
Copy link
Collaborator

murphm8 commented Oct 15, 2019

Using apt_pkg cache doesn't find a version when searching just by name. If you split the package name into <package_name>=<version> and search <package_name>'s version_list for the version we might be able to install specific versions or verify the version against the desired version in package.xml.

https://stackoverflow.com/questions/34162051/python-apt-install-package-with-specific-version

Update:
With the work done in #117 some version support was added, but it requires workarounds in rosdep to work. The following are changes that would need to be made in colcon-bundle, colcon-ros-bundle, and colcon-ros to add full apt package version specifier support.

In colcon-ros the code located here would need to be updated to parse the version attributes supported in the package.xml format: https://www.ros.org/reps/rep-0140.html#id14. Here's an example of how we set the version metadata from Python setup.cfg packages: https://github.com/colcon/colcon-core/blob/master/colcon_core/package_identification/python.py#L142.

In colcon-ros-bundle this metadata would need to be read and then converted to the format supported in

def _separate_version_information(self, package_name):
. Currently, the apt installer in colcon-bundle only supports =. Support for other version specifiers might be desirable, since those specifiers are part of the package.xml spec.

@murphm8 murphm8 changed the title Support version specifiers in package.xml Support version specifiers in package.xml (for apt packages) Oct 15, 2019
@khaiyichin
Copy link

Hi, any update on this? If I need a version that's later than the one colcon bundle finds, will this be the only way to do it?

@murphm8
Copy link
Collaborator Author

murphm8 commented Jan 29, 2020

@khaiyichin Generally speaking if you are pulling packages from the main apt repositories there is only one version of a given package available. This feature would allow you to host your own apt repository with multiple versions of a package, and then specify which version gets installed. So, if you're looking for a later version of a package you would most likely need to create your own repo as the main apt repositories lag behind especially as a distribution gets older.

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

No branches or pull requests

2 participants