summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-06-23 16:29:05 +0000
committerMarius Mauch <genone@gentoo.org>2007-06-23 16:29:05 +0000
commite5a9d1502282ac8d53239f9278cbfbaf531358c8 (patch)
treed2c0c6899f00d41ce9de0e0f82846ad20b938e99 /pym/portage
parente7b4a43587adc4da8761adf88b05e1238303331a (diff)
downloadportage-e5a9d1502282ac8d53239f9278cbfbaf531358c8.tar.gz
portage-e5a9d1502282ac8d53239f9278cbfbaf531358c8.tar.bz2
portage-e5a9d1502282ac8d53239f9278cbfbaf531358c8.zip
sort the world file before writing it and ensure that it's terminated by a newline
svn path=/main/trunk/; revision=6976
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/update.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/update.py b/pym/portage/update.py
index 34c91224b..5c53f57bc 100644
--- a/pym/portage/update.py
+++ b/pym/portage/update.py
@@ -202,7 +202,8 @@ def update_config_files(config_root, protect, protect_mask, update_iter):
sys.stdout.write("p")
sys.stdout.flush()
- write_atomic(os.path.join(config_root, WORLD_FILE), "\n".join(worldlist))
+ worldlist.sort()
+ write_atomic(os.path.join(config_root, WORLD_FILE), "\n".join(worldlist)+"\n")
protect_obj = ConfigProtect(
config_root, protect, protect_mask)