Control: tags 1143381 + patch Control: tags 1143381 + pending Dear maintainer,
I've prepared an NMU for ros2-ament-index (versioned as 1.14.2+really1.14.0-0.1) and uploaded it to DELAYED/2. Please feel free to tell me if I should cancel it. cu Adrian
diffstat for ros2-ament-index-1.14.2 ros2-ament-index-1.14.2+really1.14.0 ament_index_cpp/CHANGELOG.rst | 8 ament_index_cpp/CMakeLists.txt | 7 ament_index_cpp/include/ament_index_cpp/get_package_prefix.hpp | 11 ament_index_cpp/include/ament_index_cpp/get_package_share_directory.hpp | 51 + ament_index_cpp/include/ament_index_cpp/get_resource.hpp | 26 ament_index_cpp/include/ament_index_cpp/get_resources.hpp | 11 ament_index_cpp/include/ament_index_cpp/get_search_paths.hpp | 10 ament_index_cpp/include/ament_index_cpp/has_resource.hpp | 16 ament_index_cpp/package.xml | 2 ament_index_cpp/src/get_package_prefix.cpp | 8 ament_index_cpp/src/get_package_share_directory.cpp | 39 + ament_index_cpp/src/get_resource.cpp | 25 ament_index_cpp/src/get_resources.cpp | 11 ament_index_cpp/src/get_search_paths.cpp | 11 ament_index_cpp/src/has_resource.cpp | 23 ament_index_cpp/test/utest_deprecated.cpp | 323 ++++++++++ ament_index_python/CHANGELOG.rst | 10 ament_index_python/ament_index_python/cli.py | 14 ament_index_python/ament_index_python/packages.py | 15 ament_index_python/ament_index_python/resources.py | 77 +- ament_index_python/ament_index_python/search_paths.py | 9 ament_index_python/docs/source/conf.py | 8 ament_index_python/package.xml | 6 ament_index_python/setup.py | 2 ament_index_python/test/test_ament_index_python.py | 59 - ament_index_python/test/test_copyright.py | 2 ament_index_python/test/test_flake8.py | 4 ament_index_python/test/test_mypy.py | 2 ament_index_python/test/test_pep257.py | 2 ament_index_python/test/test_xmllint.py | 2 debian/changelog | 7 debian/patches/0001-Add-usr-as-implicit-AMENT_PREFIX_PATH.patch | 26 debian/patches/0002-Add-SOVERSION-to-shared-libs.patch | 4 debian/patches/0003-Use-correct-path-for-test-fixtures.patch | 80 ++ debian/patches/0004-Skip-broken-test.patch | 6 debian/patches/0005-Make-installation-Multi-Arch-compliant.patch | 4 36 files changed, 777 insertions(+), 144 deletions(-) diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/CHANGELOG.rst ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/CHANGELOG.rst --- ros2-ament-index-1.14.2/ament_index_cpp/CHANGELOG.rst 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/CHANGELOG.rst 2026-05-05 19:37:15.000000000 +0300 @@ -2,14 +2,6 @@ Changelog for package ament_index_cpp ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.14.2 (2026-07-17) -------------------- - -1.14.1 (2026-06-29) -------------------- -* Removed deprecated aPI (`#120 <https://github.com/ament/ament_index/issues/120>`_) -* Contributors: Alejandro Hernández Cordero - 1.14.0 (2026-05-05) ------------------- diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/CMakeLists.txt ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/CMakeLists.txt --- ros2-ament-index-1.14.2/ament_index_cpp/CMakeLists.txt 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/CMakeLists.txt 2026-05-05 19:37:15.000000000 +0300 @@ -23,6 +23,7 @@ add_library(${PROJECT_NAME} src/get_package_prefix.cpp + src/get_package_share_directory.cpp src/get_package_share_path.cpp src/get_packages_with_prefixes.cpp src/get_resource.cpp @@ -47,6 +48,12 @@ target_link_libraries(${PROJECT_NAME}_utest ${PROJECT_NAME}) endif() + ament_add_gtest(${PROJECT_NAME}_utest_deprecated test/utest_deprecated.cpp) + if(TARGET ${PROJECT_NAME}_utest_deprecated) + target_include_directories(${PROJECT_NAME}_utest_deprecated PUBLIC include) + target_link_libraries(${PROJECT_NAME}_utest_deprecated ${PROJECT_NAME}) + endif() + endif() ament_package() diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_package_prefix.hpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_package_prefix.hpp --- ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_package_prefix.hpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_package_prefix.hpp 2026-05-05 19:37:15.000000000 +0300 @@ -45,6 +45,17 @@ /// Return the installation prefix of the given package if found. /** * \param[in] package_name the name of the package to locate. + * \return installation prefix path in which the package was found. + * \throws PackageNotFoundError when the given package is not found. + */ +[[deprecated("Use get_package_prefix(..., std::filesystem::path) instead")]] +AMENT_INDEX_CPP_PUBLIC +std::string +get_package_prefix(const std::string & package_name); + +/// Return the installation prefix of the given package if found. +/** + * \param[in] package_name the name of the package to locate. * \param[out] path installation prefix path in which the package was found. * \throws PackageNotFoundError when the given package is not found. */ diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_package_share_directory.hpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_package_share_directory.hpp --- ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_package_share_directory.hpp 1970-01-01 02:00:00.000000000 +0200 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_package_share_directory.hpp 2026-05-05 19:37:15.000000000 +0300 @@ -0,0 +1,51 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__GET_PACKAGE_SHARE_DIRECTORY_HPP_ +#define AMENT_INDEX_CPP__GET_PACKAGE_SHARE_DIRECTORY_HPP_ + +#include <filesystem> +#include <string> + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ + +/// Return the share directory of the given package if found. +/** + * \param[in] package_name the name of the package to locate. + * \return share path of the package. + * \throws PackageNotFoundError when the given package is not found. + */ +[[deprecated("Use get_package_share_path(...) instead")]] +AMENT_INDEX_CPP_PUBLIC +std::string +get_package_share_directory(const std::string & package_name); + +/// Return the share directory of the given package if found. +/** + * \param[in] package_name the name of the package to locate. + * \param[out] path share path of the package. + * \return + * \throws PackageNotFoundError when the given package is not found. + */ +[[deprecated("Use get_package_share_path(...) instead")]] +AMENT_INDEX_CPP_PUBLIC +void +get_package_share_directory(const std::string & package_name, std::filesystem::path & path); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__GET_PACKAGE_SHARE_DIRECTORY_HPP_ diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_resource.hpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_resource.hpp --- ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_resource.hpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_resource.hpp 2026-05-05 19:37:15.000000000 +0300 @@ -20,8 +20,8 @@ * - get_package_prefix() * - ament_index_cpp/get_package_prefix.hpp * - Get share directory of an installed package - * - get_package_share_path() - * - ament_index_cpp/get_package_share_path.hpp + * - get_package_share_directory() + * - ament_index_cpp/get_package_share_directory.hpp * - Get a map of package names to their installation prefix * - get_packages_with_prefixes() * - ament_index_cpp/get_packages_with_prefixes.hpp @@ -29,10 +29,10 @@ * - get_resource() * - ament_index_cpp/get_resource.hpp * - Get a map of resources based on a resource type - * - get_resources_by_name() + * - get_resources() * - ament_index_cpp/get_resources.hpp * - Check if resource exists and get its path - * - is_resource_available() + * - has_resource() * - ament_index_cpp/has_resource.hpp * - Macros for controlling symbol visibility on the library * - ament_index_cpp/visibility_control.h @@ -50,6 +50,24 @@ namespace ament_index_cpp { +/// Get a the content and path of a resource +/** + * \param[in] resource_type type of the resource + * \param[in] resource_name name of the resource + * \param[out] content content of the resource + * \param[out] prefix_path the installation prefix of the given resource if found. + * \return `true` is the resource exists, `false` otherwise. + * \throws std::runtime_error if resource_type or resource_name are empty. + */ +[[deprecated("Use std::pair<> get_resource(...) instead")]] +AMENT_INDEX_CPP_PUBLIC +bool +get_resource( + const std::string & resource_type, + const std::string & resource_name, + std::string & content, + std::string * prefix_path = nullptr); + typedef struct PathWithResource { public: diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_resources.hpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_resources.hpp --- ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_resources.hpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_resources.hpp 2026-05-05 19:37:15.000000000 +0300 @@ -30,6 +30,17 @@ * \return a map of resources names to their installation prefix. * \throws std::runtime_error if resource_type is empty. */ +[[deprecated("Use get_resources_by_name instead")]] +AMENT_INDEX_CPP_PUBLIC +std::map<std::string, std::string> +get_resources(const std::string & resource_type); + +/// Get a map of resources names to their installation prefix. +/** + * \param resource_type type of the resource. + * \return a map of resources names to their installation prefix. + * \throws std::runtime_error if resource_type is empty. + */ AMENT_INDEX_CPP_PUBLIC std::map<std::string, std::filesystem::path> get_resources_by_name(const std::string & resource_type); diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_search_paths.hpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_search_paths.hpp --- ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/get_search_paths.hpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/get_search_paths.hpp 2026-05-05 19:37:15.000000000 +0300 @@ -28,6 +28,16 @@ * \return a list with the searcheable paths * \throws runtime_error if the environment variable AMENT_PREFIX_PATH is not set */ +[[deprecated("Use get_searcheable_paths() instead")]] +AMENT_INDEX_CPP_PUBLIC +std::list<std::string> +get_search_paths(); + +/// Get the searcheable paths in the environment variable AMENT_PREFIX_PATH. +/** + * \return a list with the searcheable paths + * \throws runtime_error if the environment variable AMENT_PREFIX_PATH is not set + */ AMENT_INDEX_CPP_PUBLIC std::list<std::filesystem::path> get_searcheable_paths(); diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/has_resource.hpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/has_resource.hpp --- ros2-ament-index-1.14.2/ament_index_cpp/include/ament_index_cpp/has_resource.hpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/include/ament_index_cpp/has_resource.hpp 2026-05-05 19:37:15.000000000 +0300 @@ -28,6 +28,22 @@ /** * \param[in] resource_type type of the resource * \param[in] resource_name name of the resource + * \param[out] prefix_path the installation prefix of the given resource if found. + * \return `true` if resource exists,`false` otherwise + * \throws std::runtime_error if resource_type or resource_name are empty + */ +[[deprecated("Use is_resource_available(...) instead")]] +AMENT_INDEX_CPP_PUBLIC +bool +has_resource( + const std::string & resource_type, + const std::string & resource_name, + std::string * prefix_path = nullptr); + +/// Check if resource exists and get its path +/** + * \param[in] resource_type type of the resource + * \param[in] resource_name name of the resource * \return the installation prefix of the given resource if found or std::nullopt otherwise. * Returns std::nullopt (does not throw) if resource_type or resource_name are empty. */ diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/package.xml ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/package.xml --- ros2-ament-index-1.14.2/ament_index_cpp/package.xml 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/package.xml 2026-05-05 19:37:15.000000000 +0300 @@ -2,7 +2,7 @@ <?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> <package format="2"> <name>ament_index_cpp</name> - <version>1.14.2</version> + <version>1.14.0</version> <description> C++ API to access the ament resource index. </description> diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/src/get_package_prefix.cpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_package_prefix.cpp --- ros2-ament-index-1.14.2/ament_index_cpp/src/get_package_prefix.cpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_package_prefix.cpp 2026-05-05 19:37:15.000000000 +0300 @@ -57,6 +57,14 @@ PackageNotFoundError::~PackageNotFoundError() {} +std::string +get_package_prefix(const std::string & package_name) +{ + std::filesystem::path result; + get_package_prefix(package_name, result); + return result.string(); +} + void get_package_prefix(const std::string & package_name, std::filesystem::path & path) { diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/src/get_package_share_directory.cpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_package_share_directory.cpp --- ros2-ament-index-1.14.2/ament_index_cpp/src/get_package_share_directory.cpp 1970-01-01 02:00:00.000000000 +0200 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_package_share_directory.cpp 2026-05-05 19:37:15.000000000 +0300 @@ -0,0 +1,39 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "ament_index_cpp/get_package_share_directory.hpp" +#include "ament_index_cpp/get_package_share_path.hpp" + +#include <filesystem> +#include <string> + +#include "ament_index_cpp/get_package_prefix.hpp" + +namespace ament_index_cpp +{ + +std::string +get_package_share_directory(const std::string & package_name) +{ + return get_package_share_path(package_name).string(); +} + +void get_package_share_directory( + const std::string & package_name, + std::filesystem::path & path) +{ + path = get_package_share_path(package_name); +} + +} // namespace ament_index_cpp diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/src/get_resource.cpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_resource.cpp --- ros2-ament-index-1.14.2/ament_index_cpp/src/get_resource.cpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_resource.cpp 2026-05-05 19:37:15.000000000 +0300 @@ -17,6 +17,7 @@ #include <fstream> #include <optional> #include <sstream> +#include <stdexcept> #include <string> #include <utility> @@ -49,4 +50,28 @@ return PathWithResource{std::nullopt, ""}; } +bool +get_resource( + const std::string & resource_type, + const std::string & resource_name, + std::string & content, + std::string * prefix_path) +{ + if (resource_type.empty()) { + throw std::runtime_error("ament_index_cpp::get_resource() resource type must not be empty"); + } + if (resource_name.empty()) { + throw std::runtime_error("ament_index_cpp::get_resource() resource name must not be empty"); + } + auto result = get_resource(resource_type, resource_name); + if (result.resourcePath != std::nullopt) { + content = result.contents; + if (prefix_path) { + *prefix_path = result.resourcePath.value().string(); + } + return true; + } + return false; +} + } // namespace ament_index_cpp diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/src/get_resources.cpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_resources.cpp --- ros2-ament-index-1.14.2/ament_index_cpp/src/get_resources.cpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_resources.cpp 2026-05-05 19:37:15.000000000 +0300 @@ -58,4 +58,15 @@ return resources; } +std::map<std::string, std::string> +get_resources(const std::string & resource_type) +{ + std::map<std::string, std::string> result; + std::map<std::string, std::filesystem::path> resources = get_resources_by_name(resource_type); + for (const auto & resource : resources) { + result[resource.first] = resource.second.string(); + } + return result; +} + } // namespace ament_index_cpp diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/src/get_search_paths.cpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_search_paths.cpp --- ros2-ament-index-1.14.2/ament_index_cpp/src/get_search_paths.cpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/get_search_paths.cpp 2026-05-05 19:37:15.000000000 +0300 @@ -69,4 +69,15 @@ return paths; } +std::list<std::string> +get_search_paths() +{ + std::list<std::string> result; + auto paths = get_searcheable_paths(); + for (const auto & path : paths) { + result.push_back(path.string()); + } + return result; +} + } // namespace ament_index_cpp diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/src/has_resource.cpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/has_resource.cpp --- ros2-ament-index-1.14.2/ament_index_cpp/src/has_resource.cpp 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/src/has_resource.cpp 2026-05-05 19:37:15.000000000 +0300 @@ -15,6 +15,7 @@ #include "ament_index_cpp/has_resource.hpp" #include <fstream> +#include <stdexcept> #include <string> #include "ament_index_cpp/get_search_paths.hpp" @@ -22,6 +23,28 @@ namespace ament_index_cpp { +bool +has_resource( + const std::string & resource_type, + const std::string & resource_name, + std::string * prefix_path) +{ + if (resource_type.empty()) { + throw std::runtime_error("ament_index_cpp::has_resource() resource type must not be empty"); + } + if (resource_name.empty()) { + throw std::runtime_error("ament_index_cpp::has_resource() resource name must not be empty"); + } + std::optional<std::filesystem::path> result = is_resource_available(resource_type, resource_name); + if (result.has_value()) { + if (prefix_path) { + *prefix_path = result.value().string(); + } + return true; + } + return false; +} + std::optional<std::filesystem::path> is_resource_available( const std::string & resource_type, diff -Nru ros2-ament-index-1.14.2/ament_index_cpp/test/utest_deprecated.cpp ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/test/utest_deprecated.cpp --- ros2-ament-index-1.14.2/ament_index_cpp/test/utest_deprecated.cpp 1970-01-01 02:00:00.000000000 +0200 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_cpp/test/utest_deprecated.cpp 2026-05-05 19:37:15.000000000 +0300 @@ -0,0 +1,323 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include <gtest/gtest.h> + +#include <stdlib.h> + +#include <list> +#include <map> +#include <stdexcept> +#include <string> + +#include "ament_index_cpp/get_package_prefix.hpp" +#include "ament_index_cpp/get_package_share_directory.hpp" +#include "ament_index_cpp/get_packages_with_prefixes.hpp" +#include "ament_index_cpp/get_resource.hpp" +#include "ament_index_cpp/get_resources.hpp" +#include "ament_index_cpp/get_search_paths.hpp" +#include "ament_index_cpp/has_resource.hpp" + +std::string generate_subfolder_path(std::string subfolder) +{ + // Get base path of this file + std::string base_path = __FILE__; + const std::string filename = "utest_deprecated.cpp"; + base_path = base_path.substr(0, base_path.length() - filename.length() - 1); + // Generate the base path of the subfolder in this directory + return base_path + "/" + subfolder; +} + +void set_ament_prefix_path(std::list<std::string> subfolders) +{ + std::string ament_prefix_path; + // Generate a joined string of all absolute paths + // Subfolders later in the list are searched later in the index + for (auto subfolder : subfolders) { + std::string path = generate_subfolder_path(subfolder); + if (!ament_prefix_path.empty()) { +#ifndef _WIN32 + ament_prefix_path += ":"; +#else + ament_prefix_path += ";"; +#endif + } + ament_prefix_path += path; + } + // Set environment variable +#ifndef _WIN32 + int retcode = setenv("AMENT_PREFIX_PATH", ament_prefix_path.c_str(), 1); +#else + errno_t retcode = _putenv_s("AMENT_PREFIX_PATH", ament_prefix_path.c_str()); +#endif + if (retcode) { + throw std::runtime_error("Failed to set environment variable 'AMENT_PREFIX_PATH'"); + } +} + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4996) +#else +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + +TEST(AmentIndexCpp, empty_search_paths) { + std::list<std::string> subfolders; + set_ament_prefix_path(subfolders); + EXPECT_THROW(ament_index_cpp::get_search_paths(), std::runtime_error); +} + +TEST(AmentIndexCpp, search_paths) { + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("prefix2"); + set_ament_prefix_path(subfolders); + std::list<std::string> search_paths = ament_index_cpp::get_search_paths(); + EXPECT_EQ(search_paths.size(), 2UL); +} + +TEST(AmentIndexCpp, not_existing_search_paths) { + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("not_existing_prefix"); + set_ament_prefix_path(subfolders); + std::list<std::string> search_paths = ament_index_cpp::get_search_paths(); + EXPECT_EQ(search_paths.size(), 1UL); +} + +TEST(AmentIndexCpp, get_empty_resources) { + EXPECT_THROW(ament_index_cpp::get_resources(""), std::runtime_error); +} + +TEST(AmentIndexCpp, get_unknown_resources) { + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + set_ament_prefix_path(subfolders); + std::map<std::string, std::string> resources = + ament_index_cpp::get_resources("unknown_resource_type"); + EXPECT_EQ(resources.size(), 0UL); +} + +TEST(AmentIndexCpp, get_resources) { + // Ensure that if multiple resources of a particular type exist, all are found + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + set_ament_prefix_path(subfolders); + // There are two resources of this type + std::map<std::string, std::string> resources = ament_index_cpp::get_resources("resource_type1"); + EXPECT_EQ(resources.size(), 2UL); + for (auto it : resources) { + EXPECT_EQ(it.second, generate_subfolder_path("prefix1")); + EXPECT_TRUE(it.first == "foo" || it.first == "bar"); + } +} + +TEST(AmentIndexCpp, get_resources_overlay) { + // Ensure that a resource type found in two prefixes returns two paths + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("prefix2"); + set_ament_prefix_path(subfolders); + // This resource type is found in prefix1 and prefix2 + std::map<std::string, std::string> resources = ament_index_cpp::get_resources("resource_type2"); + EXPECT_EQ(resources.size(), 2UL); + for (auto it : resources) { + EXPECT_TRUE(it.first == "foo" || it.first == "bar"); + } +} + +TEST(AmentIndexCpp, get_resources_underlay) { + // Ensure that a resource only found in one prefix only returns one path + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("prefix2"); + set_ament_prefix_path(subfolders); + // This resource type is only found in prefix2 + std::map<std::string, std::string> resources = ament_index_cpp::get_resources("resource_type3"); + EXPECT_EQ(resources.size(), 1UL); + for (auto it : resources) { + EXPECT_EQ(it.second, generate_subfolder_path("prefix2")); + EXPECT_EQ(it.first, "bar"); + } +} + +TEST(AmentIndexCpp, get_empty_resource) { + std::string content; + EXPECT_THROW(ament_index_cpp::get_resource("", "", content), std::runtime_error); +} + +TEST(AmentIndexCpp, get_unknown_resource) { + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + set_ament_prefix_path(subfolders); + std::string content; + bool success = ament_index_cpp::get_resource("resource_type4", "bar", content); + EXPECT_FALSE(success); +} + +TEST(AmentIndexCpp, get_resource) { + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + set_ament_prefix_path(subfolders); + std::string content; + bool success = ament_index_cpp::get_resource("resource_type4", "foo", content); + EXPECT_TRUE(success); + EXPECT_EQ(content, "foo"); +} + +TEST(AmentIndexCpp, get_resource_underlay) { + // Ensure that a resource can be found in the underlay if it doesn't exist in the overlay + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("prefix2"); + set_ament_prefix_path(subfolders); + std::string content; + // This resource is only found in the underlay + bool success = ament_index_cpp::get_resource("resource_type2", "bar", content); + EXPECT_TRUE(success); + EXPECT_EQ(content, ""); +} + +TEST(AmentIndexCpp, get_resource_overlay) { + // Ensure that the resource in the overlay is found before the one in the underlay + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("prefix2"); + set_ament_prefix_path(subfolders); + std::string content; + // This resource is in both the overlay and the underlay + bool success = ament_index_cpp::get_resource("resource_type5", "foo", content); + EXPECT_TRUE(success); + EXPECT_EQ(content, "foo1"); +} + +TEST(AmentIndexCpp, get_resource_overlay_base_path) { + // Ensure that a resource found in the overlay returns the correct path + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("prefix2"); + set_ament_prefix_path(subfolders); + std::string content; + std::string base_path; + // This resource is only found in the overlay + bool success = ament_index_cpp::get_resource("resource_type2", "foo", content, &base_path); + EXPECT_TRUE(success); + EXPECT_EQ(base_path, generate_subfolder_path("prefix1")); +} + +TEST(AmentIndexCpp, get_resource_underlay_base_path) { + // Ensure that a resource found in the underlay returns the correct path + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); + subfolders.push_back("prefix2"); + set_ament_prefix_path(subfolders); + std::string content; + std::string base_path; + // This resource is only found in the underlay + bool success = ament_index_cpp::get_resource("resource_type2", "bar", content, &base_path); + EXPECT_TRUE(success); + EXPECT_EQ(base_path, generate_subfolder_path("prefix2")); +} + +TEST(AmentIndexCpp, get_package_prefix) { + // Ensure that a known to exist package is found and that a known to not exist package is not. + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); // only contains foo and bar packages + subfolders.push_back("prefix2"); // only contains bar and baz packages + set_ament_prefix_path(subfolders); + // foo is found in prefix 1 + EXPECT_EQ(generate_subfolder_path("prefix1"), ament_index_cpp::get_package_prefix("foo")); + // bar is in both, but prefix 1 takes precedence + EXPECT_EQ(generate_subfolder_path("prefix1"), ament_index_cpp::get_package_prefix("bar")); + // baz is found in prefix 2 only + EXPECT_EQ(generate_subfolder_path("prefix2"), ament_index_cpp::get_package_prefix("baz")); + // exception when package is not found + EXPECT_THROW( + ament_index_cpp::get_package_prefix("does_not_exist"), + ament_index_cpp::PackageNotFoundError); + // exception when the package name is empty + EXPECT_THROW( + ament_index_cpp::get_package_prefix(""), + ament_index_cpp::PackageNotFoundError); +} + +TEST(AmentIndexCpp, get_package_share_directory) { + // Ensure that a known to exist package is found and the share directory is correct. + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); // only contains foo and bar packages + subfolders.push_back("prefix2"); // only contains bar and baz packages + set_ament_prefix_path(subfolders); + // bar is in both, but prefix 1 takes precedence + EXPECT_EQ( + (std::filesystem::path(generate_subfolder_path("prefix1")) / "share" / "bar").string(), + ament_index_cpp::get_package_share_directory("bar")); +} + +TEST(AmentIndexCpp, get_packages_with_prefixes) { + // Ensure the list of packages and prefixes matches resource layout. + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); // only contains foo and bar packages + subfolders.push_back("prefix2"); // only contains bar and baz packages + set_ament_prefix_path(subfolders); + + std::map<std::string, std::string> packages_with_prefixes = + ament_index_cpp::get_packages_with_prefixes(); + // should be exactly three elements + EXPECT_EQ(3UL, packages_with_prefixes.size()); + // foo is found in prefix 1 + EXPECT_EQ(generate_subfolder_path("prefix1"), packages_with_prefixes["foo"]); + // bar is in both, but prefix 1 takes precedence + EXPECT_EQ(generate_subfolder_path("prefix1"), packages_with_prefixes["bar"]); + // baz is found in prefix 2 only + EXPECT_EQ(generate_subfolder_path("prefix2"), packages_with_prefixes["baz"]); +} + +TEST(AmentIndexCpp, has_empty_name) { + EXPECT_THROW( + ament_index_cpp::has_resource("type", ""), + std::runtime_error); +} + +TEST(AmentIndexCpp, has_empty_type) { + EXPECT_THROW( + ament_index_cpp::has_resource("", "name"), + std::runtime_error); +} + +TEST(AmentIndexCpp, has_unknown_resource) { + bool success = ament_index_cpp::has_resource("resource_type4", "bar21"); + EXPECT_FALSE(success); +} + +TEST(AmentIndexCpp, has_resource) { + std::string result_path; + + EXPECT_TRUE(ament_index_cpp::has_resource("resource_type1", "foo", &result_path)); + EXPECT_EQ(result_path, generate_subfolder_path("prefix1")); + + EXPECT_TRUE(ament_index_cpp::has_resource("resource_type3", "bar")); + + EXPECT_TRUE(ament_index_cpp::has_resource("packages", "baz", &result_path)); + EXPECT_EQ(result_path, generate_subfolder_path("prefix2")); + + EXPECT_FALSE(ament_index_cpp::has_resource("resource_type1", "resource", &result_path)); +} + +#ifdef _MSC_VER +#pragma warning(pop) +#else +#pragma GCC diagnostic pop +#endif diff -Nru ros2-ament-index-1.14.2/ament_index_python/ament_index_python/cli.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/cli.py --- ros2-ament-index-1.14.2/ament_index_python/ament_index_python/cli.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/cli.py 2026-05-05 19:37:15.000000000 +0300 @@ -13,16 +13,15 @@ # limitations under the License. import argparse -from collections.abc import Generator import sys -from typing import Any +from typing import Any, Dict, Generator, List, Optional, Tuple, Union from ament_index_python.resources import get_resource from ament_index_python.resources import get_resource_types from ament_index_python.resources import get_resources -def main(argv: list[str] | None = None) -> str | None: +def main(argv: Optional[List[str]] = None) -> Optional[str]: if argv is None: argv = sys.argv[1:] parser = argparse.ArgumentParser( @@ -69,14 +68,15 @@ return None -def resource_type_completer(prefix: str | tuple[str, ...], - **kwargs: Any) -> Generator[str, None, None]: +def resource_type_completer(prefix: Union[str, Tuple[str, ...]], + **kwarg: Dict[str, Any]) -> Generator[str, None, None]: return (t for t in get_resource_types() if t.startswith(prefix)) -def resource_name_completer(prefix: str | tuple[str, ...], +def resource_name_completer(prefix: Union[str, Tuple[str, ...]], parsed_args: argparse.Namespace, - **kwargs: Any) -> Generator[str, None, None] | list[str]: + **kwargs: Dict[str, Any]) -> Union[Generator[str, None, None], + List[str]]: resource_type = getattr(parsed_args, 'resource_type', None) if not resource_type: return [] diff -Nru ros2-ament-index-1.14.2/ament_index_python/ament_index_python/packages.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/packages.py --- ros2-ament-index-1.14.2/ament_index_python/ament_index_python/packages.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/packages.py 2026-05-05 19:37:15.000000000 +0300 @@ -13,8 +13,9 @@ # limitations under the License. import os -from pathlib import Path +import pathlib import re +from typing import Dict import warnings @@ -24,10 +25,10 @@ class PackageNotFoundError(KeyError): - """Raised when a package is not found in the search paths.""" + pass -def get_packages_with_prefixes() -> dict[str, str]: +def get_packages_with_prefixes() -> Dict[str, str]: """ Return a dict of package names to the prefixes in which they are found. @@ -54,12 +55,12 @@ # exemptions. See https://ros.org/reps/rep-0127.html#name if re.fullmatch('[a-zA-Z0-9][a-zA-Z0-9_-]+', package_name, re.ASCII) is None: raise ValueError( - f"'{package_name}' is not a valid package name") + "'{}' is not a valid package name".format(package_name)) try: content, package_prefix = get_resource('packages', package_name) except LookupError: raise PackageNotFoundError( - f"package '{package_name}' not found, searching: {get_search_paths()}") + "package '{}' not found, searching: {}".format(package_name, get_search_paths())) return package_prefix @@ -84,7 +85,7 @@ return path -def get_package_share_path(package_name: str, print_warning: bool = True) -> Path: +def get_package_share_path(package_name: str, print_warning: bool = True) -> pathlib.Path: """ Return the share directory of the given package as a pathlib.Path. @@ -99,7 +100,7 @@ :returns: share directory of the package as a pathlib.Path :raises: :exc:`PackageNotFoundError` if the package is not found """ - path = Path(get_package_share_directory(package_name, print_warning=False)) + path = pathlib.Path(get_package_share_directory(package_name, print_warning=False)) if print_warning and not path.exists(): warnings.warn(f'Share path for {package_name} ({path}) does not exist.', stacklevel=2) return path diff -Nru ros2-ament-index-1.14.2/ament_index_python/ament_index_python/resources.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/resources.py --- ros2-ament-index-1.14.2/ament_index_python/ament_index_python/resources.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/resources.py 2026-05-05 19:37:15.000000000 +0300 @@ -13,8 +13,13 @@ # limitations under the License. import os -from pathlib import Path -from typing import Literal +import sys +from typing import Dict, Literal, Tuple, Union + +if sys.version_info >= (3, 10): + Set = set +else: + from typing import Set from .constants import RESOURCE_INDEX_SUBFOLDER from .search_paths import get_search_paths @@ -23,10 +28,14 @@ class InvalidResourceTypeNameError(ValueError): """Raised when a resource type name is invalid.""" + pass + class InvalidResourceNameError(ValueError): """Raised when a resource name is invalid.""" + pass + def _name_is_invalid(resource_name: str) -> bool: """ @@ -46,7 +55,7 @@ return ('/' in resource_name) or ('\\' in resource_name) -def get_resource(resource_type: str, resource_name: str) -> tuple[str, str]: +def get_resource(resource_type: str, resource_name: str) -> Tuple[str, str]: """ Get the content of a specific resource and its prefix path. @@ -55,6 +64,7 @@ :param resource_name: the name of the resource :type resource_name: str :returns: a tuple of the content (bytes) of the resource and its prefix path + :raises: :exc:`EnvironmentError` :raises: :exc:`OSError` :raises: :exc:`LookupError` :raises: :exc:`InvalidResourceTypeNameError` @@ -71,10 +81,11 @@ raise InvalidResourceNameError( f"Resource name '{resource_name}' is invalid") for path in get_search_paths(): - resource_path = Path(path, RESOURCE_INDEX_SUBFOLDER, resource_type, resource_name) - if resource_path.is_file(): + resource_path = os.path.join(path, RESOURCE_INDEX_SUBFOLDER, resource_type, resource_name) + if os.path.isfile(resource_path): try: - content = resource_path.read_text(encoding='utf-8') + with open(resource_path, 'r') as h: + content = h.read() except OSError as e: raise OSError( f"Could not open the resource '{resource_name}' of type " @@ -84,14 +95,14 @@ f"Could not find the resource '{resource_name}' of type '{resource_type}'") -def get_resources(resource_type: str) -> dict[str, str]: +def get_resources(resource_type: str) -> Dict[str, str]: """ Get the resource names of all resources of the specified type. :param resource_type: the type of the resource :type resource_type: str :returns: dict of resource names to the prefix path they are in - :raises: :exc:`OSError` + :raises: :exc:`EnvironmentError` :raises: :exc:`InvalidResourceTypeNameError` """ if not resource_type: @@ -101,39 +112,39 @@ f"Resource type '{resource_type}' is invalid") resources = {} for path in get_search_paths(): - resource_path = Path(path, RESOURCE_INDEX_SUBFOLDER, resource_type) - if resource_path.is_dir(): - with os.scandir(resource_path) as entries: - for entry in entries: - # Ignore subdirectories, and anything starting with a dot - if entry.is_dir() or entry.name.startswith('.'): - continue - if entry.name not in resources: - resources[entry.name] = path + resource_path = os.path.join(path, RESOURCE_INDEX_SUBFOLDER, resource_type) + if os.path.isdir(resource_path): + for resource in os.listdir(resource_path): + # Ignore subdirectories, and anything starting with a dot + if os.path.isdir(os.path.join(resource_path, resource)) \ + or resource.startswith('.'): + continue + if resource not in resources: + resources[resource] = path return resources -def get_resource_types() -> set[str]: +def get_resource_types() -> Set[str]: """ Get the resource types. :returns: set of resource types within the search paths - :raises: :exc:`OSError` + :raises: :exc:`EnvironmentError` """ resource_types = set() for path in get_search_paths(): - basepath = Path(path, RESOURCE_INDEX_SUBFOLDER) - if basepath.is_dir(): - with os.scandir(basepath) as entries: - for entry in entries: - # Ignore non-subdirectories, and anything starting with a dot - if not entry.is_dir() or entry.name.startswith('.'): - continue - resource_types.add(entry.name) + basepath = os.path.join(path, RESOURCE_INDEX_SUBFOLDER) + if os.path.isdir(basepath): + for resource_type in os.listdir(basepath): + # Ignore non-subdirectories, and anything starting with a dot + if not os.path.isdir(os.path.join(basepath, resource_type)) \ + or resource_type.startswith('.'): + continue + resource_types.add(resource_type) return resource_types -def has_resource(resource_type: str, resource_name: str) -> str | Literal[False]: +def has_resource(resource_type: str, resource_name: str) -> Union[str, Literal[False]]: """ Check if a specific resource exists. @@ -142,7 +153,7 @@ :param resource_names: the name of the resource :type resource_name: str :returns: The prefix path if the resource exists, False otherwise - :raises: :exc:`OSError` + :raises: :exc:`EnvironmentError` :raises: :exc:`InvalidResourceTypeNameError` :raises: :exc:`InvalidResourceNameError` """ @@ -150,12 +161,12 @@ assert resource_name, 'The resource name must not be empty' if _name_is_invalid(resource_type): raise InvalidResourceTypeNameError( - f"Resource type '{resource_type}' is invalid") + "Resource type '%s' is invalid" % resource_type) if _name_is_invalid(resource_name): raise InvalidResourceNameError( - f"Resource name '{resource_name}' is invalid") + "Resource name '%s' is invalid" % resource_name) for path in get_search_paths(): - resource_path = Path(path, RESOURCE_INDEX_SUBFOLDER, resource_type, resource_name) - if resource_path.is_file(): + resource_path = os.path.join(path, RESOURCE_INDEX_SUBFOLDER, resource_type, resource_name) + if os.path.isfile(resource_path): return path return False diff -Nru ros2-ament-index-1.14.2/ament_index_python/ament_index_python/search_paths.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/search_paths.py --- ros2-ament-index-1.14.2/ament_index_python/ament_index_python/search_paths.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/ament_index_python/search_paths.py 2026-05-05 19:37:15.000000000 +0300 @@ -13,21 +13,22 @@ # limitations under the License. import os +from typing import List from .constants import AMENT_PREFIX_PATH_ENV_VAR -def get_search_paths() -> list[str]: +def get_search_paths() -> List[str]: """ Get the paths from the environment variable 'AMENT_PREFIX_PATH'. :returns: list of paths - :raises: :exc:`OSError` + :raises: :exc:`EnvironmentError` """ ament_prefix_path = os.environ.get(AMENT_PREFIX_PATH_ENV_VAR) if not ament_prefix_path: - raise OSError( - f"Environment variable '{AMENT_PREFIX_PATH_ENV_VAR}' is not set or empty") + raise EnvironmentError( + "Environment variable '{}' is not set or empty".format(AMENT_PREFIX_PATH_ENV_VAR)) paths = ament_prefix_path.split(os.pathsep) return [p for p in paths if p and os.path.exists(p)] diff -Nru ros2-ament-index-1.14.2/ament_index_python/CHANGELOG.rst ros2-ament-index-1.14.2+really1.14.0/ament_index_python/CHANGELOG.rst --- ros2-ament-index-1.14.2/ament_index_python/CHANGELOG.rst 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/CHANGELOG.rst 2026-05-05 19:37:15.000000000 +0300 @@ -2,16 +2,6 @@ Changelog for package ament_index_python ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.14.2 (2026-07-17) -------------------- -* [ament_index_python] Enforce ` --ament-strict` (`#113 <https://github.com/ament/ament_index/issues/113>`_) -* Use pathlib and os.scandir (`#124 <https://github.com/ament/ament_index/issues/124>`_) -* Python3 modernization (`#123 <https://github.com/ament/ament_index/issues/123>`_) -* Contributors: Alejandro Hernández Cordero, Michael Carlstrom - -1.14.1 (2026-06-29) -------------------- - 1.14.0 (2026-05-05) ------------------- diff -Nru ros2-ament-index-1.14.2/ament_index_python/docs/source/conf.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/docs/source/conf.py --- ros2-ament-index-1.14.2/ament_index_python/docs/source/conf.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/docs/source/conf.py 2026-05-05 19:37:15.000000000 +0300 @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# -*- coding: utf-8 -*- +# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a @@ -29,7 +31,7 @@ # sys.path.insert(0, os.path.abspath('.')) # -- Imports ----------------------------------------------------- -from collections.abc import Sequence +from typing import Dict, List, Sequence # -- Project information ----------------------------------------------------- @@ -104,7 +106,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path: list[str] = [] +html_static_path: List[str] = [] # Custom sidebar templates, must be a dictionary that maps document names # to template names. @@ -125,7 +127,7 @@ # -- Options for LaTeX output ------------------------------------------------ -latex_elements: dict[str, str] = { +latex_elements: Dict[str, str] = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', diff -Nru ros2-ament-index-1.14.2/ament_index_python/package.xml ros2-ament-index-1.14.2+really1.14.0/ament_index_python/package.xml --- ros2-ament-index-1.14.2/ament_index_python/package.xml 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/package.xml 2026-05-05 19:37:15.000000000 +0300 @@ -1,8 +1,8 @@ <?xml version="1.0"?> -<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> -<package format="3"> +<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> +<package format="2"> <name>ament_index_python</name> - <version>1.14.2</version> + <version>1.14.0</version> <description> Python API to access the ament resource index. </description> diff -Nru ros2-ament-index-1.14.2/ament_index_python/setup.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/setup.py --- ros2-ament-index-1.14.2/ament_index_python/setup.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/setup.py 2026-05-05 19:37:15.000000000 +0300 @@ -5,7 +5,7 @@ setup( name=package_name, - version='1.14.2', + version='1.14.0', packages=find_packages(exclude=['test']), data_files=[ ('share/' + package_name, ['package.xml']), diff -Nru ros2-ament-index-1.14.2/ament_index_python/test/test_ament_index_python.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_ament_index_python.py --- ros2-ament-index-1.14.2/ament_index_python/test/test_ament_index_python.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_ament_index_python.py 2026-05-05 19:37:15.000000000 +0300 @@ -12,12 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from argparse import Namespace import os from pathlib import Path, PurePath -from _pytest.capture import CaptureFixture - from ament_index_python import get_package_prefix from ament_index_python import get_package_share_directory from ament_index_python import get_package_share_path @@ -37,7 +34,7 @@ import pytest -def set_ament_prefix_path(subfolders: list[str]) -> None: +def set_ament_prefix_path(subfolders): paths = [] base_path = Path(__file__).parent for subfolder in subfolders: @@ -48,31 +45,31 @@ os.environ['AMENT_PREFIX_PATH'] = ament_prefix_path -def test_empty_search_paths() -> None: +def test_empty_search_paths(): set_ament_prefix_path([]) - with pytest.raises(OSError): + with pytest.raises(EnvironmentError): get_search_paths() -def test_search_paths() -> None: +def test_search_paths(): set_ament_prefix_path(['prefix1', 'prefix2']) search_paths = get_search_paths() assert len(search_paths) == 2, 'Expected two search paths' -def test_not_existing_search_paths() -> None: +def test_not_existing_search_paths(): set_ament_prefix_path(['prefix1', 'not_existing_prefix']) search_paths = get_search_paths() assert len(search_paths) == 1, 'Expected one search paths' -def test_unknown_resources() -> None: +def test_unknown_resources(): set_ament_prefix_path(['prefix1']) resources = get_resources('unknown_resource_type') assert len(resources) == 0, 'Expected no resources' -def test_invalid_resources() -> None: +def test_invalid_resources(): set_ament_prefix_path(['prefix1']) invalid_resource_type_names = [ @@ -91,28 +88,28 @@ get_resource(name, 'example_resource') -def test_resources() -> None: +def test_resources(): set_ament_prefix_path(['prefix1']) resources = get_resources('resource_type1') assert len(resources) == 2, 'Expected two resources' assert set(resources.keys()) == {'foo', 'bar'}, 'Expected different resources' -def test_resources_overlay() -> None: +def test_resources_overlay(): set_ament_prefix_path(['prefix1', 'prefix2']) resources = get_resources('resource_type2') assert len(resources) == 2, 'Expected two resource' assert set(resources.keys()) == {'foo', 'bar'}, 'Expected different resources' -def test_resources_underlay() -> None: +def test_resources_underlay(): set_ament_prefix_path(['prefix1', 'prefix2']) resources = get_resources('resource_type3') assert len(resources) == 1, 'Expected one resource' assert set(resources.keys()) == {'bar'}, 'Expected different resources' -def test_unknown_resource() -> None: +def test_unknown_resource(): set_ament_prefix_path(['prefix1']) exists = has_resource('resource_type4', 'bar') assert not exists, 'Resource should not exist' @@ -121,7 +118,7 @@ get_resource('resource_type4', 'bar') -def test_invalid_resource_names() -> None: +def test_invalid_resource_names(): set_ament_prefix_path(['prefix1']) invalid_resource_names = [ @@ -136,7 +133,7 @@ get_resource('resource_type4', name) -def test_absolute_path_resource() -> None: +def test_absolute_path_resource(): extant_absolute_path = os.path.abspath(__file__) set_ament_prefix_path(['prefix1']) @@ -148,7 +145,7 @@ get_resource('resource_type4', str(extant_absolute_path)) -def test_resource() -> None: +def test_resource(): set_ament_prefix_path(['prefix1']) exists = has_resource('resource_type4', 'foo') assert exists, 'Resource should exist' @@ -158,7 +155,7 @@ assert PurePath(prefix).name == 'prefix1', 'Expected different prefix' -def test_resource_overlay() -> None: +def test_resource_overlay(): set_ament_prefix_path(['prefix1', 'prefix2']) resource, prefix = get_resource('resource_type5', 'foo') @@ -166,7 +163,7 @@ assert PurePath(prefix).name == 'prefix1', 'Expected different prefix' -def test_get_packages_with_prefixes() -> None: +def test_get_packages_with_prefixes(): set_ament_prefix_path(['prefix1', 'prefix2']) packages = get_packages_with_prefixes() @@ -181,10 +178,10 @@ assert not get_packages_with_prefixes(), 'Expected to find no packages' -def test_get_package_prefix() -> None: +def test_get_package_prefix(): set_ament_prefix_path(['prefix1', 'prefix2']) - def get_package_prefix_basename(package_name: str) -> str: + def get_package_prefix_basename(package_name): return PurePath(get_package_prefix(package_name)).name assert get_package_prefix_basename('foo') == 'prefix1', "Expected 'foo' in 'prefix1'" @@ -208,10 +205,10 @@ get_package_prefix(extant_absolute_path) -def test_get_package_share_directory() -> None: +def test_get_package_share_directory(): set_ament_prefix_path(['prefix1', 'prefix2']) - def get_package_share_directory_test(package_name: str, expect_prefix: str) -> None: + def get_package_share_directory_test(package_name, expect_prefix): full_share_dir = get_package_share_directory(package_name) left_over, dirname = os.path.split(full_share_dir) assert dirname == package_name, f"Expected package name '{package_name}'" @@ -238,10 +235,10 @@ get_package_share_directory('trogdor', print_warning=False) -def test_get_package_share_path() -> None: +def test_get_package_share_path(): set_ament_prefix_path(['prefix1', 'prefix2']) - def get_package_share_path_test(package_name: str, expect_prefix: str) -> None: + def get_package_share_path_test(package_name, expect_prefix): my_path = get_package_share_path(package_name) assert len(my_path.parts) >= 3 assert my_path.parts[-1] == package_name, f"Expected package name '{package_name}'" @@ -263,9 +260,9 @@ get_package_share_path('trogdor', print_warning=False) -def test_get_resource_types() -> None: +def test_get_resource_types(): set_ament_prefix_path([]) - with pytest.raises(OSError): + with pytest.raises(EnvironmentError): get_resource_types() set_ament_prefix_path(['prefix1', 'prefix2']) @@ -292,7 +289,7 @@ 'resource_type5 and packages') -def test_main_tool(capsys: CaptureFixture[str]) -> None: +def test_main_tool(capsys): set_ament_prefix_path(['prefix1', 'prefix2']) base_path = Path(__file__).parent @@ -335,7 +332,7 @@ assert result == expected_result -def test_autocomplete() -> None: +def test_autocomplete(): set_ament_prefix_path(['prefix1', 'prefix2']) result = sorted(resource_type_completer('res')) @@ -348,7 +345,9 @@ ] assert result == expected_result - arguments = Namespace(resource_type='packages') + class arguments(): + resource_type = 'packages' + result = sorted(resource_name_completer('ba', arguments)) expected_result = ['bar', 'baz'] assert result == expected_result diff -Nru ros2-ament-index-1.14.2/ament_index_python/test/test_copyright.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_copyright.py --- ros2-ament-index-1.14.2/ament_index_python/test/test_copyright.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_copyright.py 2026-05-05 19:37:15.000000000 +0300 @@ -18,6 +18,6 @@ @pytest.mark.copyright @pytest.mark.linter -def test_copyright() -> None: +def test_copyright(): rc = main(argv=['.', 'test']) assert rc == 0, 'Found errors' diff -Nru ros2-ament-index-1.14.2/ament_index_python/test/test_flake8.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_flake8.py --- ros2-ament-index-1.14.2/ament_index_python/test/test_flake8.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_flake8.py 2026-05-05 19:37:15.000000000 +0300 @@ -18,8 +18,8 @@ @pytest.mark.flake8 @pytest.mark.linter -def test_flake8() -> None: +def test_flake8(): rc, errors = main_with_errors(argv=[]) assert rc == 0, \ - f'Found {len(errors)} code style errors / warnings:\n' + \ + 'Found %d code style errors / warnings:\n' % len(errors) + \ '\n'.join(errors) diff -Nru ros2-ament-index-1.14.2/ament_index_python/test/test_mypy.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_mypy.py --- ros2-ament-index-1.14.2/ament_index_python/test/test_mypy.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_mypy.py 2026-05-05 19:37:15.000000000 +0300 @@ -16,5 +16,5 @@ def test_mypy() -> None: - rc = main(argv=['--ament-strict']) + rc = main(argv=['--exclude', 'test']) assert rc == 0, 'Found code style errors / warnings' diff -Nru ros2-ament-index-1.14.2/ament_index_python/test/test_pep257.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_pep257.py --- ros2-ament-index-1.14.2/ament_index_python/test/test_pep257.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_pep257.py 2026-05-05 19:37:15.000000000 +0300 @@ -18,6 +18,6 @@ @pytest.mark.linter @pytest.mark.pep257 -def test_pep257() -> None: +def test_pep257(): rc = main(argv=[]) assert rc == 0, 'Found code style errors / warnings' diff -Nru ros2-ament-index-1.14.2/ament_index_python/test/test_xmllint.py ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_xmllint.py --- ros2-ament-index-1.14.2/ament_index_python/test/test_xmllint.py 2026-07-17 17:44:28.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/ament_index_python/test/test_xmllint.py 2026-05-05 19:37:15.000000000 +0300 @@ -18,6 +18,6 @@ @pytest.mark.linter @pytest.mark.xmllint -def test_xmllint() -> None: +def test_xmllint(): rc = main(argv=[]) assert rc == 0, 'Found errors' diff -Nru ros2-ament-index-1.14.2/debian/changelog ros2-ament-index-1.14.2+really1.14.0/debian/changelog --- ros2-ament-index-1.14.2/debian/changelog 2026-07-22 00:20:26.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/debian/changelog 2026-10-11 15:28:38.000000000 +0300 @@ -1,3 +1,10 @@ +ros2-ament-index (1.14.2+really1.14.0-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * Revert to 1.14.0 due to ABI breakage in 1.14.1. (Closes: #1143381) + + -- Adrian Bunk <[email protected]> Sun, 11 Oct 2026 15:28:38 +0300 + ros2-ament-index (1.14.2-1) unstable; urgency=medium * New upstream version 1.14.2 diff -Nru ros2-ament-index-1.14.2/debian/patches/0001-Add-usr-as-implicit-AMENT_PREFIX_PATH.patch ros2-ament-index-1.14.2+really1.14.0/debian/patches/0001-Add-usr-as-implicit-AMENT_PREFIX_PATH.patch --- ros2-ament-index-1.14.2/debian/patches/0001-Add-usr-as-implicit-AMENT_PREFIX_PATH.patch 2026-07-22 00:20:26.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/debian/patches/0001-Add-usr-as-implicit-AMENT_PREFIX_PATH.patch 2026-05-08 16:46:28.000000000 +0300 @@ -5,12 +5,12 @@ --- ament_index_cpp/src/get_search_paths.cpp | 12 ++++++++++-- ament_index_cpp/test/utest.cpp | 21 +++++++++++++++++++++ - .../ament_index_python/search_paths.py | 8 ++++++-- + .../ament_index_python/search_paths.py | 10 ++++++++-- ament_index_python/test/test_ament_index_python.py | 7 +++++++ - 4 files changed, 44 insertions(+), 4 deletions(-) + 4 files changed, 46 insertions(+), 4 deletions(-) diff --git a/ament_index_cpp/src/get_search_paths.cpp b/ament_index_cpp/src/get_search_paths.cpp -index ec9a652..bce627f 100644 +index c3fc2fc..f330cbe 100644 --- a/ament_index_cpp/src/get_search_paths.cpp +++ b/ament_index_cpp/src/get_search_paths.cpp @@ -33,17 +33,19 @@ get_searcheable_paths() @@ -81,40 +81,42 @@ std::list<std::string> subfolders; subfolders.push_back("prefix1"); diff --git a/ament_index_python/ament_index_python/search_paths.py b/ament_index_python/ament_index_python/search_paths.py -index 738f2d3..a28cd34 100644 +index 2453511..e3b9a03 100644 --- a/ament_index_python/ament_index_python/search_paths.py +++ b/ament_index_python/ament_index_python/search_paths.py -@@ -25,9 +25,13 @@ def get_search_paths() -> list[str]: - :raises: :exc:`OSError` +@@ -26,9 +26,15 @@ def get_search_paths() -> List[str]: + :raises: :exc:`EnvironmentError` """ ament_prefix_path = os.environ.get(AMENT_PREFIX_PATH_ENV_VAR) - if not ament_prefix_path: + add_usr = not os.environ.get("AMENT_PREFIX_NO_IMPLICIT_USR") ++ + if not ament_prefix_path and not add_usr: - raise OSError( - f"Environment variable '{AMENT_PREFIX_PATH_ENV_VAR}' is not set or empty") + raise EnvironmentError( + "Environment variable '{}' is not set or empty".format(AMENT_PREFIX_PATH_ENV_VAR)) - paths = ament_prefix_path.split(os.pathsep) + paths = ament_prefix_path.split(os.pathsep) if ament_prefix_path else [] + if add_usr: + # Debian-specific + paths.append("/usr") ++ return [p for p in paths if p and os.path.exists(p)] diff --git a/ament_index_python/test/test_ament_index_python.py b/ament_index_python/test/test_ament_index_python.py -index 0fd85e8..f592087 100644 +index b75a629..ded27b4 100644 --- a/ament_index_python/test/test_ament_index_python.py +++ b/ament_index_python/test/test_ament_index_python.py -@@ -54,6 +54,13 @@ def test_empty_search_paths() -> None: +@@ -51,6 +51,13 @@ def test_empty_search_paths(): get_search_paths() -+def test_implicit_usr() -> None: ++def test_implicit_usr(): + set_ament_prefix_path([]) + os.environ['AMENT_PREFIX_NO_IMPLICIT_USR'] = '' + search_paths = get_search_paths() + assert search_paths == ["/usr"] + + - def test_search_paths() -> None: + def test_search_paths(): set_ament_prefix_path(['prefix1', 'prefix2']) search_paths = get_search_paths() diff -Nru ros2-ament-index-1.14.2/debian/patches/0002-Add-SOVERSION-to-shared-libs.patch ros2-ament-index-1.14.2+really1.14.0/debian/patches/0002-Add-SOVERSION-to-shared-libs.patch --- ros2-ament-index-1.14.2/debian/patches/0002-Add-SOVERSION-to-shared-libs.patch 2026-07-22 00:20:26.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/debian/patches/0002-Add-SOVERSION-to-shared-libs.patch 2026-05-08 16:46:28.000000000 +0300 @@ -7,10 +7,10 @@ 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ament_index_cpp/CMakeLists.txt b/ament_index_cpp/CMakeLists.txt -index bdfc90d..dd9049e 100644 +index 800fce7..986c239 100644 --- a/ament_index_cpp/CMakeLists.txt +++ b/ament_index_cpp/CMakeLists.txt -@@ -34,7 +34,9 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE "AMENT_INDEX_CPP_BUILDING_DLL +@@ -35,7 +35,9 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE "AMENT_INDEX_CPP_BUILDING_DLL target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<INSTALL_INTERFACE:include/${PROJECT_NAME}>") diff -Nru ros2-ament-index-1.14.2/debian/patches/0003-Use-correct-path-for-test-fixtures.patch ros2-ament-index-1.14.2+really1.14.0/debian/patches/0003-Use-correct-path-for-test-fixtures.patch --- ros2-ament-index-1.14.2/debian/patches/0003-Use-correct-path-for-test-fixtures.patch 2026-07-22 00:20:26.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/debian/patches/0003-Use-correct-path-for-test-fixtures.patch 2026-05-08 16:46:28.000000000 +0300 @@ -3,22 +3,30 @@ Subject: Use correct path for test fixtures --- - ament_index_cpp/CMakeLists.txt | 1 + - ament_index_cpp/test/utest.cpp | 7 ++++++- - ament_index_python/test/test_ament_index_python.py | 1 + - 3 files changed, 8 insertions(+), 1 deletion(-) + ament_index_cpp/CMakeLists.txt | 2 ++ + ament_index_cpp/test/utest.cpp | 7 +++++- + ament_index_cpp/test/utest_deprecated.cpp | 28 +++++++++++++++++++++- + ament_index_python/test/test_ament_index_python.py | 1 + + 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/ament_index_cpp/CMakeLists.txt b/ament_index_cpp/CMakeLists.txt -index dd9049e..7d12efc 100644 +index 986c239..e3f7da6 100644 --- a/ament_index_cpp/CMakeLists.txt +++ b/ament_index_cpp/CMakeLists.txt -@@ -47,6 +47,7 @@ if(BUILD_TESTING) +@@ -48,12 +48,14 @@ if(BUILD_TESTING) if(TARGET ${PROJECT_NAME}_utest) target_include_directories(${PROJECT_NAME}_utest PUBLIC include) target_link_libraries(${PROJECT_NAME}_utest ${PROJECT_NAME}) + target_compile_definitions(${PROJECT_NAME}_utest PRIVATE "AMENT_INDEX_CPP_TEST_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/test/utest.cpp\"") endif() + ament_add_gtest(${PROJECT_NAME}_utest_deprecated test/utest_deprecated.cpp) + if(TARGET ${PROJECT_NAME}_utest_deprecated) + target_include_directories(${PROJECT_NAME}_utest_deprecated PUBLIC include) + target_link_libraries(${PROJECT_NAME}_utest_deprecated ${PROJECT_NAME}) ++ target_compile_definitions(${PROJECT_NAME}_utest_deprecated PRIVATE "AMENT_INDEX_CPP_TEST_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/test/utest_deprecated.cpp\"") + endif() + endif() diff --git a/ament_index_cpp/test/utest.cpp b/ament_index_cpp/test/utest.cpp index f8286c0..fbcb860 100644 @@ -48,11 +56,67 @@ int retcode = setenv("AMENT_PREFIX_PATH", ament_prefix_path.c_str(), 1); #else errno_t retcode = _putenv_s("AMENT_PREFIX_PATH", ament_prefix_path.c_str()); +diff --git a/ament_index_cpp/test/utest_deprecated.cpp b/ament_index_cpp/test/utest_deprecated.cpp +index b5f39bc..b9b918d 100644 +--- a/ament_index_cpp/test/utest_deprecated.cpp ++++ b/ament_index_cpp/test/utest_deprecated.cpp +@@ -29,10 +29,14 @@ + #include "ament_index_cpp/get_search_paths.hpp" + #include "ament_index_cpp/has_resource.hpp" + ++#ifndef AMENT_INDEX_CPP_TEST_PATH ++#define AMENT_INDEX_CPP_TEST_PATH __FILE__ ++#endif ++ + std::string generate_subfolder_path(std::string subfolder) + { + // Get base path of this file +- std::string base_path = __FILE__; ++ std::string base_path = AMENT_INDEX_CPP_TEST_PATH; + const std::string filename = "utest_deprecated.cpp"; + base_path = base_path.substr(0, base_path.length() - filename.length() - 1); + // Generate the base path of the subfolder in this directory +@@ -57,6 +61,7 @@ void set_ament_prefix_path(std::list<std::string> subfolders) + } + // Set environment variable + #ifndef _WIN32 ++ setenv("AMENT_PREFIX_NO_IMPLICIT_USR", "1", 1); + int retcode = setenv("AMENT_PREFIX_PATH", ament_prefix_path.c_str(), 1); + #else + errno_t retcode = _putenv_s("AMENT_PREFIX_PATH", ament_prefix_path.c_str()); +@@ -80,6 +85,27 @@ TEST(AmentIndexCpp, empty_search_paths) { + EXPECT_THROW(ament_index_cpp::get_search_paths(), std::runtime_error); + } + ++#ifndef _WIN32 ++TEST(AmentIndexCpp, implicit_usr_empty_var) { ++ std::list<std::string> subfolders; ++ set_ament_prefix_path(subfolders); ++ setenv("AMENT_PREFIX_NO_IMPLICIT_USR", "", 1); ++ std::list<std::filesystem::path> search_paths = ament_index_cpp::get_searcheable_paths(); ++ EXPECT_EQ(search_paths.size(), 1UL); ++ EXPECT_EQ(search_paths.front(), "/usr"); ++} ++ ++TEST(AmentIndexCpp, implicit_usr_null_var) { ++ std::list<std::string> subfolders; ++ set_ament_prefix_path(subfolders); ++ setenv("AMENT_PREFIX_NO_IMPLICIT_USR", "", 1); ++ unsetenv("AMENT_PREFIX_PATH"); ++ std::list<std::filesystem::path> search_paths = ament_index_cpp::get_searcheable_paths(); ++ EXPECT_EQ(search_paths.size(), 1UL); ++ EXPECT_EQ(search_paths.front(), "/usr"); ++} ++#endif ++ + TEST(AmentIndexCpp, search_paths) { + std::list<std::string> subfolders; + subfolders.push_back("prefix1"); diff --git a/ament_index_python/test/test_ament_index_python.py b/ament_index_python/test/test_ament_index_python.py -index f592087..a9691f1 100644 +index ded27b4..6524220 100644 --- a/ament_index_python/test/test_ament_index_python.py +++ b/ament_index_python/test/test_ament_index_python.py -@@ -45,6 +45,7 @@ def set_ament_prefix_path(subfolders: list[str]) -> None: +@@ -42,6 +42,7 @@ def set_ament_prefix_path(subfolders): if path.is_dir(): paths.append(str(path)) ament_prefix_path = os.pathsep.join(paths) diff -Nru ros2-ament-index-1.14.2/debian/patches/0004-Skip-broken-test.patch ros2-ament-index-1.14.2+really1.14.0/debian/patches/0004-Skip-broken-test.patch --- ros2-ament-index-1.14.2/debian/patches/0004-Skip-broken-test.patch 2026-07-22 00:20:26.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/debian/patches/0004-Skip-broken-test.patch 2026-05-08 16:46:28.000000000 +0300 @@ -7,14 +7,14 @@ 1 file changed, 1 insertion(+) diff --git a/ament_index_python/test/test_ament_index_python.py b/ament_index_python/test/test_ament_index_python.py -index a9691f1..77ece07 100644 +index 6524220..91667ac 100644 --- a/ament_index_python/test/test_ament_index_python.py +++ b/ament_index_python/test/test_ament_index_python.py -@@ -300,6 +300,7 @@ def test_get_resource_types() -> None: +@@ -297,6 +297,7 @@ def test_get_resource_types(): 'resource_type5 and packages') [email protected](reason='test is broken') - def test_main_tool(capsys: CaptureFixture[str]) -> None: + def test_main_tool(capsys): set_ament_prefix_path(['prefix1', 'prefix2']) base_path = Path(__file__).parent diff -Nru ros2-ament-index-1.14.2/debian/patches/0005-Make-installation-Multi-Arch-compliant.patch ros2-ament-index-1.14.2+really1.14.0/debian/patches/0005-Make-installation-Multi-Arch-compliant.patch --- ros2-ament-index-1.14.2/debian/patches/0005-Make-installation-Multi-Arch-compliant.patch 2026-07-22 00:20:26.000000000 +0300 +++ ros2-ament-index-1.14.2+really1.14.0/debian/patches/0005-Make-installation-Multi-Arch-compliant.patch 2026-05-08 16:46:28.000000000 +0300 @@ -7,10 +7,10 @@ 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ament_index_cpp/CMakeLists.txt b/ament_index_cpp/CMakeLists.txt -index 7d12efc..f780fea 100644 +index e3f7da6..3fd68de 100644 --- a/ament_index_cpp/CMakeLists.txt +++ b/ament_index_cpp/CMakeLists.txt -@@ -52,13 +52,15 @@ if(BUILD_TESTING) +@@ -60,13 +60,15 @@ if(BUILD_TESTING) endif()

