portage.emaint.modules.merges.merges module¶
- class portage.emaint.modules.merges.merges.MergesHandler¶
Bases:
object
Handle failed package merges.
- _emerge_pkg_atoms(module_output, pkg_atoms, yes=False)¶
Emerge the specified packages atoms.
- Parameters
module_output (Class) – output will be written to
pkg_atoms (set) – packages atoms to emerge
yes (bool) – do not prompt for emerge invocations
- Return type
list
- Returns
List of results
- _failed_pkgs(onProgress=None)¶
Return failed packages from both the file system and tracking file.
- Return type
dict
- Returns
dictionary of packages that failed to merges
- _get_pkg_atoms(failed_pkgs, pkg_atoms, pkg_invalid_entries)¶
Get the package atoms for the specified failed packages.
- Parameters
failed_pkgs (dict) – failed packages to iterate
pkg_atoms (set) – add package atoms to this set
pkg_invalid_entries (set) – add any packages that are invalid to this set
- _remove_failed_dirs(failed_pkgs)¶
Remove the directories of packages that failed to merge.
- Parameters
failed_pkgs – failed packages whose directories to remove
- _scan(onProgress=None)¶
Scan the file system for failed merges and return any found.
- Parameters
onProgress (Function) – function to call for updating progress
- Return type
dict
- Returns
dictionary of packages that failed to merges
- can_progressbar(func)¶
- check(**kwargs)¶
Check for failed merges.
- fix(**kwargs)¶
Attempt to fix any failed merges.
- static name()¶
- purge(**kwargs)¶
Attempt to remove previously saved tracking file.
- short_desc = 'Remove failed merges'¶
- class portage.emaint.modules.merges.merges.TrackingFile(tracking_path)¶
Bases:
object
File for keeping track of failed merges.
- exists()¶
Check if tracking file exists.
- Return type
bool
- Returns
true if tracking file exists, false otherwise
- load()¶
Load previously failed merges.
- Return type
dict
- Returns
dictionary of packages that failed to merge
- purge()¶
Delete previously saved tracking file if one exists.
- save(failed_pkgs)¶
Save the specified packages that failed to merge.
- Parameters
failed_pkgs (dict) – dictionary of failed packages