For bug #180706, add sorting and a trailing newline in the rest of the cases where...
authorZac Medico <zmedico@gentoo.org>
Sun, 24 Jun 2007 18:58:42 +0000 (18:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 24 Jun 2007 18:58:42 +0000 (18:58 -0000)
svn path=/main/trunk/; revision=6999

bin/emaint
bin/regenworld
pym/emerge/__init__.py

index 1c179df10cf4a39995fb135b24c4b6dd82b1f378..d13827ba548cbf33955374feffad5a106ff34908 100755 (executable)
@@ -69,7 +69,8 @@ class WorldHandler(object):
                self._check_world(onProgress)
                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
index ebac4a5916f1e29f919dc15917a0fef5c64b8376..6016534064c662840d4aad2476abba19a8408551 100755 (executable)
@@ -92,4 +92,5 @@ for mykey in biglist:
                        print "add to world:",myfavkey
                        worldlist.append(myfavkey)
 
-portage.write_atomic(os.path.join("/", portage.WORLD_FILE), "\n".join(worldlist))
+portage.write_atomic(os.path.join("/", portage.WORLD_FILE),
+       "\n".join(sorted(worldlist)) + "\n")
index c9e2e6e54a56fefabe01d15235343396697783d8..b2fb55c86cdfefa21470a6f1e933f5b20918636d 100644 (file)
@@ -3072,7 +3072,7 @@ class MergeTask(object):
                                "--pretend" in self.myopts):
                                portage.write_atomic(
                                        os.path.join(self.target_root, portage.WORLD_FILE),
-                                       "\n".join(myfavdict.values()))
+                                               "\n".join(sorted(myfavdict.values())) + "\n")
 
                        mtimedb["resume"]["mergelist"]=mymergelist[:]
                        mtimedb.commit()