Module update
source code
|
|
long
int(x=0) -> int or long int(x, base=10) -> int or long
|
|
|
| update_dbentry(update_cmd,
mycontent,
eapi=None,
parent=None) |
source code
|
|
|
|
update_dbentries(update_iter,
mydata,
eapi=None,
parent=None)
Performs update commands and returns a dict containing only the
updated items. |
source code
|
|
|
|
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). |
source code
|
|
|
|
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). |
source code
|
|
|
|
parse_updates(mycontent)
Valid updates are returned as a list of split update commands. |
source code
|
|
|
|
update_config_files(config_root,
protect,
protect_mask,
update_iter,
match_callback=None)
Perform global updates on /etc/portage/package.*, /etc/portage/profile/package.*,
/etc/portage/profile/packages and /etc/portage/sets. |
source code
|
|
|
|
|
|
|
ignored_dbentries = (u'CONTENTS', u'environment.bz2')
|
|
|
__package__ = 'portage'
|
Imports:
errno,
io,
re,
stat,
sys,
warnings,
os,
_encodings,
_unicode_decode,
_unicode_encode,
portage,
USER_CONFIG_PATH,
VCS_DIRS,
_get_eapi_attrs,
DirectoryNotFound,
InvalidAtom,
PortageException,
_,
_unicode,
Atom,
ConfigProtect,
_get_slot_re,
dep_getkey,
isvalidatom,
match_from_list,
new_protect_filename,
normalize_path,
write_atomic,
writemsg
fixdbentries(update_iter,
dbdir,
eapi=None,
parent=None)
| source code
|
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.
|
|
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.
|
update_config_files(config_root,
protect,
protect_mask,
update_iter,
match_callback=None)
| source code
|
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
|