Skip to content

Commit 84494ae

Browse files
authored
Merge pull request #94 from traversaro/fixpkgremovalrosdistro
Skip package if XML is not present in rosdistro
2 parents 8ba3ab6 + a93f04e commit 84494ae

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

vinca/main.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,17 @@ def generate_output(pkg_shortname, vinca_conf, distro, version, all_pkgs=None):
334334
},
335335
"build": {"script": ""},
336336
}
337+
338+
xml = distro.get_release_package_xml(pkg_shortname)
339+
340+
# If the snapshot is not aligned with the latest rosdistro (for example if a package is removed,
341+
# see https://github.com/RoboStack/ros-jazzy/pull/107#issuecomment-3338962041), get_release_package_xml can return none,
342+
# in that case we can just skip the package, remove if https://github.com/RoboStack/vinca/issues/93 is fixed
343+
if not xml:
344+
print("Skip " + pkg_shortname + " as it is present in our snapshot, but not in the latest rosdistro cache.")
345+
return None
337346

338-
pkg = catkin_pkg.package.parse_package_string(
339-
distro.get_release_package_xml(pkg_shortname)
340-
)
347+
pkg = catkin_pkg.package.parse_package_string(xml)
341348

342349
pkg.evaluate_conditions(os.environ)
343350

0 commit comments

Comments
 (0)