@@ -47,6 +47,7 @@ class PackageXmlMetadataProvider(MetadataProvider): # type: ignore[misc] # Met
4747 def __init__ ( # type: ignore[no-untyped-def] # no typing for args and kwargs
4848 self ,
4949 package_xml_path : str ,
50+ manifest_root : str ,
5051 * args ,
5152 extra_input_globs : list [str ] | None = None ,
5253 package_mapping_files : list [str ] | None = None ,
@@ -57,11 +58,13 @@ def __init__( # type: ignore[no-untyped-def] # no typing for args and kwargs
5758
5859 Args:
5960 package_xml_path: Path to the package.xml file
61+ manifest_root: Path to the manifest root directory
6062 extra_input_globs: Additional glob patterns to include
6163 package_mapping_files: Package mapping file paths to track as inputs
6264 """
6365 super ().__init__ (* args , ** kwargs )
6466 self .package_xml_path = package_xml_path
67+ self .manifest_root = manifest_root
6568 self ._package_data : PackageData | None = None
6669 self ._extra_input_globs = list (extra_input_globs or [])
6770 self ._package_mapping_files = list (package_mapping_files or [])
@@ -148,8 +151,9 @@ def license(self) -> str | None:
148151 return None
149152
150153 def license_file (self ) -> str | None :
151- """Return package.xml as the license files."""
152- return "package.xml"
154+ """Return package.xml as the license files, relative to manifest_root."""
155+ # TODO: This does not work currently, so return None
156+ return None
153157
154158 def summary (self ) -> str | None :
155159 """Return the description as summary from package.xml."""
@@ -189,6 +193,7 @@ class ROSPackageXmlMetadataProvider(PackageXmlMetadataProvider):
189193 def __init__ (
190194 self ,
191195 package_xml_path : str ,
196+ manifest_root : str ,
192197 distro_name : str | None = None ,
193198 * ,
194199 extra_input_globs : list [str ] | None = None ,
@@ -199,12 +204,14 @@ def __init__(
199204
200205 Args:
201206 package_xml_path: Path to the package.xml file
207+ manifest_root: Path to the manifest root directory
202208 distro_name: ROS distro. If None, will use the base package name without distro prefix.
203209 extra_input_globs: Additional glob patterns to include
204210 package_mapping_files: Package mapping file paths to track as inputs
205211 """
206212 super ().__init__ (
207213 package_xml_path ,
214+ manifest_root = manifest_root ,
208215 extra_input_globs = extra_input_globs ,
209216 package_mapping_files = package_mapping_files ,
210217 )
0 commit comments