Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10865 - main/trunk/pym/portage/dbapi
Date: Tue, 01 Jul 2008 08:24:14
Message-Id: E1KDb9k-0001sj-5I@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-07-01 08:24:07 +0000 (Tue, 01 Jul 2008)
3 New Revision: 10865
4
5 Modified:
6 main/trunk/pym/portage/dbapi/vartree.py
7 Log:
8 Handle potential errors in PreservedLibsRegistry.store() now that it can
9 be called via pruneNonExisting(), due to things such as portageq calls
10 where the user may not have write permission to the registry.
11
12
13 Modified: main/trunk/pym/portage/dbapi/vartree.py
14 ===================================================================
15 --- main/trunk/pym/portage/dbapi/vartree.py 2008-07-01 08:10:17 UTC (rev 10864)
16 +++ main/trunk/pym/portage/dbapi/vartree.py 2008-07-01 08:24:07 UTC (rev 10865)
17 @@ -64,9 +64,13 @@
18 """ Store the registry data to file. No need to call this if autocommit
19 was enabled.
20 """
21 - f = atomic_ofstream(self._filename)
22 - cPickle.dump(self._data, f)
23 - f.close()
24 + try:
25 + f = atomic_ofstream(self._filename)
26 + cPickle.dump(self._data, f)
27 + f.close()
28 + except EnvironmentError, e:
29 + if e.errno != PermissionDenied.errno:
30 + writemsg("!!! %s %s\n" % (e, self._filename), noiselevel=-1)
31
32 def register(self, cpv, slot, counter, paths):
33 """ Register new objects in the registry. If there is a record with the
34
35 --
36 gentoo-commits@l.g.o mailing list