Skip to content

Commit f027616

Browse files
Jammy (#81)
* Continue on error * Include per-distro environment flags * fixup * Goodbye python2 * Don't run rosdep init if it was already configured * Allow to select which ros distros to build * Fix warning * Don't continue on error --------- Co-authored-by: Paul Bovbel <[email protected]>
1 parent 949ff2e commit f027616

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

environment/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN git clone https://github.com/locusrobotics/deb-s3.git && \
3838
cd deb-s3 && bundle update --bundler && bundle install && ln -sf $(pwd)/bin/deb-s3 /usr/local/bin/deb-s3
3939

4040
# Inject the rosdep definitions from source
41-
RUN rosdep init
41+
RUN if [[ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]] ; then rosdep init ; fi
4242
RUN echo "yaml file:///etc/ros/rosdep/rosdep.yaml" > /etc/ros/rosdep/sources.list.d/10-tailor.list
4343
COPY rosdistro/rosdep/rosdep.yaml /etc/ros/rosdep/rosdep.yaml
4444

tailor_distro/create_recipes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ def nested_update(d, u):
2323
return d
2424

2525

26+
def check_distro(recipe, os_version):
27+
tmp = deepcopy(recipe)
28+
for distro, config in recipe["distributions"].items():
29+
os_list = config.get("os", [])
30+
if len(os_list) != 0:
31+
if os_version not in os_list:
32+
del tmp["distributions"][distro]
33+
return tmp
34+
35+
2636
def create_recipes(recipes: Mapping[str, Any], recipes_dir: pathlib.Path, release_track: str,
2737
release_label: str, debian_version: str) -> None:
2838
"""Create individual recipe defintions from a master recipes configuration.
@@ -41,6 +51,7 @@ def create_recipes(recipes: Mapping[str, Any], recipes_dir: pathlib.Path, releas
4151
recipe_path.parent.mkdir(parents=True, exist_ok=True)
4252

4353
recipe = nested_update(recipes['common'], recipe_options)
54+
recipe = check_distro(recipe, os_version)
4455

4556
recipe = dict(
4657
**recipe,

tailor_distro/debian_templates/changelog.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
* TODO
44

5-
-- Paul Bovbel <pbovbel@locusrobotics.com> Mon, 1 Jan 2018 00:00:00 -0000
5+
-- Paul Bovbel <pbovbel@locusrobotics.com> Mon, 1 Jan 2018 00:00:00 -0000

tailor_distro/debian_templates/compat_catkin_tools/_setup_util.py.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/python3
22
# -*- coding: utf-8 -*-
33

44
# Software License Agreement (BSD License)
@@ -55,7 +55,7 @@ ENV_VAR_SUBFOLDERS = {
5555
'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': ['lib', os.path.join('lib', 'x86_64-linux-gnu')],
5656
'PATH': 'bin',
5757
'PKG_CONFIG_PATH': [os.path.join('lib', 'pkgconfig'), os.path.join('lib', 'x86_64-linux-gnu', 'pkgconfig')],
58-
'PYTHONPATH': 'lib/python2.7/dist-packages',
58+
'PYTHONPATH': 'lib/python3/dist-packages',
5959
}
6060

6161

tailor_distro/debian_templates/rules.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ override_dh_auto_install:
3434
source $(INSTALL_DIR)/{{ underlay_name }}/setup.bash && \
3535
{% endif %}
3636
{% endfor %}
37+
{% for key, value in distro_options['env'].items() %}
38+
export {{ key }}={{ value }} && \
39+
{% endfor %}
3740
export ROS_DISTRO_OVERRIDE={{ organization }}-{{ release_label }}-{{ flavour }} && \
3841
env && \
3942
TERM=dumb colcon build \

0 commit comments

Comments
 (0)