portage.update module

portage.update.dep_transform(mydep, oldkey, newkey)
portage.update.fixdbentries(update_iter, dbdir, eapi=None, parent=None)

Performs update commands which result in search and replace operations for each of the files in dbdir (excluding CONTENTS and environment.bz2). Returns True when actual modifications are necessary and False otherwise.

portage.update.grab_updates(updpath, prev_mtimes=None)

Returns all the updates from the given directory as a sorted list of tuples, each containing (file_path, statobj, content). If prev_mtimes is given then updates are only returned if one or more files have different mtimes. When a change is detected for a given file, updates will be returned for that file and any files that come after it in the entire sequence. This ensures that all relevant updates are returned for cases in which the destination package of an earlier move corresponds to the source package of a move that comes somewhere later in the entire sequence of files.


Valid updates are returned as a list of split update commands.

portage.update.update_config_files(config_root, protect, protect_mask, update_iter, match_callback=None, case_insensitive=False)

Perform global updates on /etc/portage/package.*, /etc/portage/profile/package.*, /etc/portage/profile/packages and /etc/portage/sets. config_root - location of files to update protect - list of paths from CONFIG_PROTECT protect_mask - list of paths from CONFIG_PROTECT_MASK update_iter - list of update commands as returned from parse_updates(),

or dict of {repo_name: list}

match_callback - a callback which will be called with three arguments:

match_callback(repo_name, old_atom, new_atom)

and should return boolean value determining whether to perform the update

portage.update.update_dbentries(update_iter, mydata, eapi=None, parent=None)

Performs update commands and returns a dict containing only the updated items.

portage.update.update_dbentry(update_cmd, mycontent, eapi=None, parent=None)