From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 17 Mar 2013 03:29:26 +0000 (+0100) Subject: portage.update.update_config_files(): Add handling of: X-Git-Tag: v2.2.0_alpha167~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5ce4a445532de6cb0dba9dbf66e4916cf7e3a68a;p=portage.git portage.update.update_config_files(): Add handling of: /etc/portage/profile/packages /etc/portage/profile/package.use.force /etc/portage/profile/package.use.mask /etc/portage/profile/package.use.stable.force /etc/portage/profile/package.use.stable.mask --- diff --git a/pym/portage/update.py b/pym/portage/update.py index 1b45a7aaf..6317d11b6 100644 --- a/pym/portage/update.py +++ b/pym/portage/update.py @@ -282,7 +282,7 @@ def parse_updates(mycontent): return myupd, errors def update_config_files(config_root, protect, protect_mask, update_iter, match_callback = None): - """Perform global updates on /etc/portage/package.*. + """Perform global updates on /etc/portage/package.*, /etc/portage/profile/packages and /etc/portage/profile/package.*. config_root - location of files to update protect - list of paths from CONFIG_PROTECT protect_mask - list of paths from CONFIG_PROTECT_MASK @@ -307,7 +307,13 @@ def update_config_files(config_root, protect, protect_mask, update_iter, match_c "package.mask", "package.properties", "package.unmask", "package.use" ] - myxfiles += [os.path.join("profile", x) for x in myxfiles] + myxfiles += [os.path.join("profile", x) for x in ( + "packages", "package.accept_keywords", + "package.keywords", "package.mask", + "package.unmask", "package.use", + "package.use.force", "package.use.mask", + "package.use.stable.force", "package.use.stable.mask" + )] abs_user_config = os.path.join(config_root, USER_CONFIG_PATH) recursivefiles = [] for x in myxfiles: @@ -356,7 +362,6 @@ def update_config_files(config_root, protect, protect_mask, update_iter, match_c if f is not None: f.close() - # update /etc/portage/packages.* ignore_line_re = re.compile(r'^#|^\s*$') if repo_dict is None: update_items = [(None, update_iter)] @@ -376,6 +381,9 @@ def update_config_files(config_root, protect, protect_mask, update_iter, match_c if atom[:1] == "-": # package.mask supports incrementals atom = atom[1:] + if atom[:1] == "*": + # packages file supports "*"-prefixed atoms as indication of system packages. + atom = atom[1:] if not isvalidatom(atom): continue new_atom = update_dbentry(update_cmd, atom)