diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-01 02:33:08 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-01 02:33:08 -0700 |
commit | 4c341455d665ae68e19b5ddd269c45afe04c0c31 (patch) | |
tree | c6f627a0518b33aa29b7951874c2c91c8c71a4c5 | |
parent | Make update_config_files() take a dict of {repo_name: list} since it's more (diff) | |
download | portage-multirepo-4c341455d665ae68e19b5ddd269c45afe04c0c31.tar.gz portage-multirepo-4c341455d665ae68e19b5ddd269c45afe04c0c31.tar.bz2 portage-multirepo-4c341455d665ae68e19b5ddd269c45afe04c0c31.zip |
* Make _world_repo_match() try to match both atoms, so it still works
if the world file and vdb are slighly out of sync wrt package moves.
* Write world file updates at the earliest opportunity.
-rw-r--r-- | pym/portage/_global_updates.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/pym/portage/_global_updates.py b/pym/portage/_global_updates.py index e9ec4530..ed514112 100644 --- a/pym/portage/_global_updates.py +++ b/pym/portage/_global_updates.py @@ -127,6 +127,8 @@ def _global_updates(trees, prev_mtimes): can find a match for old atom name, warn about that. """ matches = vardb.match(atoma) + if not matches: + matches = vardb.match(atomb) if matches and \ repo_match(vardb.aux_get(best(matches), ['repository'])[0]): if portdb.match(atoma): @@ -161,6 +163,15 @@ def _global_updates(trees, prev_mtimes): if moves: writemsg_stdout(moves * "S") + if world_modified: + world_list.sort() + write_atomic(world_file, + "".join("%s\n" % (x,) for x in world_list)) + if world_warnings: + # XXX: print warning that we've updated world entries + # and the old name still matches something (from an overlay)? + pass + if retupd: def _config_repo_match(repo_name, atoma, atomb): @@ -222,13 +233,4 @@ def _global_updates(trees, prev_mtimes): writemsg_stdout(bold(_("Note: This can take a very long time."))) writemsg_stdout("\n") - if world_modified: - world_list.sort() - write_atomic(world_file, - "".join("%s\n" % (x,) for x in world_list)) - if world_warnings: - # XXX: print warning that we've updated world entries - # and the old name still matches something (from an overlay)? - pass - return retupd |