craft_parts.executor.filesets module

Definitions and helpers to handle filesets.

class craft_parts.executor.filesets.Fileset(entries, *, name='')[source]

Bases: object

Helper class to process string lists.

Parameters:
  • entries (List[str]) –

  • name (str) –

combine(other)[source]

Combine the entries in this fileset with entries from another fileset.

Parameters:

other (Fileset) – The fileset to combine with.

Return type:

None

property entries: List[str]

Return the list of entries in this fileset.

Return type:

List[str]

property excludes: List[str]

Return the list of files to be excluded.

Return type:

List[str]

property includes: List[str]

Return the list of files to be included.

Return type:

List[str]

property name: str

Return the fileset name.

Return type:

str

remove(item)[source]

Remove this entry from the list of files.

Parameters:

item (str) – The item to remove.

Return type:

None

craft_parts.executor.filesets.migratable_filesets(fileset, srcdir)[source]

Return the files and directories that can be migrated.

Parameters:
  • fileset (Fileset) – The fileset to migrate.

  • srcdir (str) –

Return type:

Tuple[Set[str], Set[str]]

Returns:

A tuple containing the set of files and the set of directories that can be migrated.