in deepracer_systems_pkg/deepracer_systems_pkg/software_update_module/software_update_node.py [0:0]
def update_pkg_candidate_list(self):
"""Helper method to identify the packages that have an update candidate available and
populate the update_list.
"""
self.update_list = list()
# Find relevant packages.
for package_name in software_update_config.DEEPRACER_PACKAGES:
if package_name in self.cache:
package = self.cache[package_name]
self.get_logger().info(f"Verifying package {package.name}...")
if not package.candidate.version.startswith(software_update_config.VERSION_MASK):
self.get_logger().info(f"* {package.name} package is not built for the Ubuntu and ROS packages; "
f"candidate { package.candidate.version} is will not be used")
continue
self.get_logger().info(f"* {package.name} package passes the version check; "
f"verifying candidate {package.candidate.version}")
# New package?
if not package.is_installed:
self.get_logger().info(f"* {package.name} package not installed; "
f"candidate {package.candidate.version} is added to update list")
self.update_list.append(package)
# Newer version available?
elif package.candidate.version > package.installed:
self.get_logger().info(f"* {package.name} package update available: "
f"{package.candidate.version} > {package.installed.version}; "
"Added to update list")
self.update_list.append(package)