summaryrefslogtreecommitdiffstats
path: root/bin/emaint
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-24 19:06:10 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-24 19:06:10 +0000
commit4dd5d69f9902ae00534d430dc1351ee9ec165bb7 (patch)
treebd6fb670a71868434bb0ca1d2cf0f26276bab269 /bin/emaint
parent058a5fc1b8c757baf2981b0d21191950792a56f6 (diff)
downloadportage-4dd5d69f9902ae00534d430dc1351ee9ec165bb7.tar.gz
portage-4dd5d69f9902ae00534d430dc1351ee9ec165bb7.tar.bz2
portage-4dd5d69f9902ae00534d430dc1351ee9ec165bb7.zip
sort the world file before writing it and ensure that it's terminated by a newline (bug #180706, trunk r6976 and r6999)
svn path=/main/branches/2.1.2/; revision=7000
Diffstat (limited to 'bin/emaint')
-rwxr-xr-xbin/emaint3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/emaint b/bin/emaint
index e86920a2f..0353a52ce 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -58,7 +58,8 @@ class WorldHandler(object):
def fix(self):
errors = []
try:
- portage.write_atomic(self.world_file, "\n".join(self.okay))
+ portage.write_atomic(self.world_file,
+ "\n".join(sorted(self.okay)) + "\n")
except portage_exception.PortageException:
errors.append(self.world_file + " could not be opened for writing")
return errors