craft_parts.sources.local_source module¶
The local source handler and helpers.
- class craft_parts.sources.local_source.LocalSource(*args, project_dirs, copy_function=<function link_or_copy>, **kwargs)[source]¶
Bases:
SourceHandler
The local source handler.
- Parameters:
args (
Any
) –project_dirs (
ProjectDirs
) –copy_function (
Callable
[...
,None
]) –kwargs (
Any
) –
- check_if_outdated(target, *, ignore_files=None)[source]¶
Check if pulled sources have changed since target was created.
- Parameters:
target (
str
) – Path to target file.ignore_files (
Optional
[List
[str
]]) – Files excluded from verification.
- Return type:
bool
- Returns:
Whether the sources are outdated.
- get_outdated_files()[source]¶
Obtain lists of outdated files and directories.
- Return type:
Tuple
[List
[str
],List
[str
]]- Returns:
The lists of outdated files and directories.
- Raises:
errors.SourceUpdateUnsupported – If the source handler can’t check if files are outdated.
- update()[source]¶
Update pulled source.
Call method
check_if_outdated()
before updating to populate the lists of files and directories to copy.- Return type:
None