Skip to content

Commit

Permalink
Merge branch 'master' into fix_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay committed Mar 13, 2024
2 parents 35a05c9 + 7c12df5 commit e9cea4b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion ros_buildfarm/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ def get_distribution_repository_keys(urls, key_files):
def get_binary_package_versions(apt_cache, debian_pkg_names):
versions = {}
for debian_pkg_name in debian_pkg_names:
pkg = apt_cache[debian_pkg_name]
pkg = apt_cache.get(debian_pkg_name)
if not pkg:
prov = apt_cache.get_providing_packages(debian_pkg_name)
if not prov:
raise KeyError("No packages available for '%s'" % (debian_pkg_name,))
assert len(prov) == 1
pkg = apt_cache[prov[0]]
versions[debian_pkg_name] = max(pkg.versions).version
return versions

Expand Down Expand Up @@ -318,6 +324,7 @@ def get_short_os_code_name(os_code_name):
'focal': 'F',
'jammy': 'J',
'jessie': 'J',
'noble': 'N',
'saucy': 'S',
'stretch': 'S',
'trusty': 'T',
Expand Down
6 changes: 5 additions & 1 deletion ros_buildfarm/templates/devel/devel_task.Dockerfile.em
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ RUN python3 -u /tmp/wrapper_scripts/apt.py update-install-clean -q -y git python
RUN python3 -u /tmp/wrapper_scripts/apt.py update-install-clean -q -y python3-pip
@# colcon-core.package_identification.python needs at least setuptools 30.3.0
@# pytest-rerunfailures enables usage of --retest-until-pass
RUN pip3 install -U setuptools==59.6.0 pytest-rerunfailures
@(TEMPLATE(
'snippet/install_pytest-rerunfailures.Dockerfile.em',
os_name=os_name,
))@
RUN pip3 install -U setuptools==59.6.0
@[end if]@
RUN python3 -u /tmp/wrapper_scripts/apt.py update-install-clean -q -y ccache

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@[if os_name == 'debian' or os_name == 'ubuntu']@
@# python3-pytest-rerunfailures is supported since Ubuntu jammy
RUN for i in 1 2 3; do apt-get update && apt-get install -q -y python3-pytest-rerunfailures && apt-get clean && break || if [ $i -lt 3 ]; then sleep 5; else false; fi; done
@[end if]@

0 comments on commit e9cea4b

Please sign in to comment.