craft_parts.packages.platform module

Helpers to determine the repository for the platform.

craft_parts.packages.platform.is_deb_based(distro=None)[source]

Verify the distribution packaging system.

Parameters:

distro (Optional[str]) – The distribution name.

Return type:

bool

Returns:

Whether the distribution uses .deb packages.

craft_parts.packages.platform.is_dnf_based(distro=None)[source]

Verify the distribution packaging system.

Parameters:

distro (Optional[str]) – The distribution name.

Return type:

bool

Returns:

Whether the distribution handles packages through DNF.

craft_parts.packages.platform.is_yum_based(distro=None)[source]

Verify the distribution packaging system.

Parameters:

distro (Optional[str]) – The distribution name.

Return type:

bool

Returns:

Whether the distribution handles packages through YUM.