Skip to content

Commit

Permalink
Noetic support
Browse files Browse the repository at this point in the history
Signed-off-by: Hunter L. Allen <[email protected]>
  • Loading branch information
allenh1 authored and robwoolley committed Nov 27, 2024
1 parent f3dc27c commit 9fad476
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
7 changes: 4 additions & 3 deletions superflore/generators/ebuild/ebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,13 @@ def get_ebuild_text(self, distributor, license_text):
# EAPI=<eapi>
ret = self.get_license_line(distributor, license_text)
ret += self.get_eapi_line()

if self.python_3 and not self.is_ros2:
# enable python 2.7 and python 3.5
ret += self.get_python_compat(['2_7', '3_5', '3_6'])
elif self.python_3:
# only use 3.5, 3.6 for ROS 2
ret += self.get_python_compat(['3_5', '3_6'])
elif self.python_3 or (self.distro == 'noetic'):
# only use 3.5 - 3.9 for ROS 2 or noetic
ret += self.get_python_compat(['3_5', '3_6', '3_7', '3_8', '3_9'])
else:
# fallback to python 2.7
ret += self.get_python_compat(['2_7'])
Expand Down
41 changes: 30 additions & 11 deletions superflore/generators/ebuild/overlay_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ def commit_changes(self, distro):
self.repo.git.commit(m='{0}'.format(commit_msg))

def regenerate_manifests(
self, regen_dict, image_owner='allenh1', image_name='ros_gentoo_base'
self,
regen_dict,
image_owner='allenh1',
image_name='ros_gentoo_base',
split_limit=1000
):
info(
"Pulling docker image '%s/%s:latest'..." % (
Expand All @@ -76,16 +80,31 @@ def regenerate_manifests(
'/root/.gnupg'
)
dock.map_directory(self.repo.repo_dir, '/tmp/ros-overlay')
for key in regen_dict.keys():
for pkg in regen_dict[key]:
pkg_dir = '/tmp/ros-overlay/ros-{0}/{1}'.format(key, pkg)
dock.add_bash_command('cd {0}'.format(pkg_dir))
dock.add_bash_command('repoman manifest')
try:
dock.run(show_cmd=True)
except docker.errors.ContainerError:
print(dock.log)
raise
for distro in regen_dict.keys():
chunk_list = []
chunk_count = 0
pkg_list = regen_dict[distro]
while len(pkg_list) > 0:
current_chunk = list()
for x in range(split_limit):
if len(pkg_list) > 0:
current_chunk.append(pkg_list.pop())
else:
break
chunk_list.append(current_chunk)
info("Regeneration list consists of '%d' chunks" % len(chunk_list))
info("key_lists: '%s'" % chunk_list)
for chunk in chunk_list:
for pkg in chunk:
pkg_dir = '/tmp/ros-overlay/ros-{0}/{1}'.format(distro, pkg)
dock.add_bash_command('cd {0}'.format(pkg_dir))
dock.add_bash_command('repoman manifest')
try:
dock.run(show_cmd=True)
dock.clear_commands()
except docker.errors.ContainerError:
print(dock.log)
raise

def pull_request(self, message, overlay=None, title=''):
if not title:
Expand Down

0 comments on commit 9fad476

Please sign in to comment.