Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r9881 - main/trunk/pym/portage/sets
Date: Mon, 14 Apr 2008 00:03:01 +0000
Author: zmedico
Date: 2008-04-14 00:03:00 +0000 (Mon, 14 Apr 2008)
New Revision: 9881

Modified:
   main/trunk/pym/portage/sets/files.py
Log:
Fix buggy logic in WorldSet.load() that causes it to discard all of
it's atoms in some cases (leading to loss of the whole world file).


Modified: main/trunk/pym/portage/sets/files.py
===================================================================
--- main/trunk/pym/portage/sets/files.py	2008-04-13 23:21:13 UTC (rev 9880)
+++ main/trunk/pym/portage/sets/files.py	2008-04-14 00:03:00 UTC (rev 9881)
@@ -185,6 +185,7 @@
 	def load(self):
 		atoms = []
 		nonatoms = []
+		atoms_changed = False
 		# load atoms and non-atoms from different files so the worldfile is 
 		# backwards-compatible with older versions and other PMs, even though 
 		# it's supposed to be private state data :/
@@ -205,11 +206,12 @@
 				data = {}
 			atoms = data.keys()
 			self._mtime = mtime
+			atoms_changed = True
 		try:
 			mtime = os.stat(self._filename2).st_mtime
 		except (OSError, IOError):
 			mtime = None
-		if (not self._loaded or self._mtime2 != mtime):
+		if (not self._loaded or self._mtime2 != mtime or atoms_changed):
 			try:
 				data, errors = self.loader2.load()
 				for fname in errors:
@@ -222,7 +224,8 @@
 				data = {}
 			nonatoms = data.keys()
 			self._mtime2 = mtime
-		if self._atoms != atoms or self._nonatoms != nonatoms:
+			atoms_changed = True
+		if atoms_changed:
 			self._setAtoms(atoms+nonatoms)
 		
 	def _ensure_dirs(self):

-- 
gentoo-commits@g.o mailing list


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo commit in src/patchsets/coreutils/6.10: 050_all_coreutils-6.10-mv-atomic.patch
Next by thread:
portage r9882 - main/trunk/pym/portage/sets
Previous by date:
gentoo commit in src/patchsets/coreutils/6.10: 050_all_coreutils-6.10-mv-atomic.patch
Next by date:
portage r9882 - main/trunk/pym/portage/sets


Updated Feb 21, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.