1 |
Author: zmedico |
2 |
Date: 2008-04-24 02:48:45 +0000 (Thu, 24 Apr 2008) |
3 |
New Revision: 9954 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Fix broken mtimedb resume list handling for automatic uninstall tasks. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/_emerge/__init__.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/_emerge/__init__.py 2008-04-24 02:31:09 UTC (rev 9953) |
14 |
+++ main/trunk/pym/_emerge/__init__.py 2008-04-24 02:48:45 UTC (rev 9954) |
15 |
@@ -4849,13 +4849,15 @@ |
16 |
pass |
17 |
spawned_pids.remove(pid) |
18 |
|
19 |
- def _dequeue_uninstall_tasks(self, ldpath_mtimes): |
20 |
+ def _dequeue_uninstall_tasks(self, mtimedb): |
21 |
if not self._uninstall_queue: |
22 |
return |
23 |
for uninst_task in self._uninstall_queue: |
24 |
root_config = self.trees[uninst_task.root]["root_config"] |
25 |
unmerge(root_config, self.myopts, "unmerge", |
26 |
- [uninst_task.cpv], ldpath_mtimes, clean_world=0) |
27 |
+ [uninst_task.cpv], mtimedb["ldpath"], clean_world=0) |
28 |
+ del mtimedb["resume"]["mergelist"][0] |
29 |
+ mtimedb.commit() |
30 |
del self._uninstall_queue[:] |
31 |
|
32 |
def _merge(self, mylist, favorites, mtimedb): |
33 |
@@ -5113,7 +5115,7 @@ |
34 |
return retval |
35 |
bintree = self.trees[myroot]["bintree"] |
36 |
bintree.inject(pkg_key, filename=binpkg_tmpfile) |
37 |
- self._dequeue_uninstall_tasks(ldpath_mtimes) |
38 |
+ self._dequeue_uninstall_tasks(mtimedb) |
39 |
if "--buildpkgonly" not in self.myopts: |
40 |
msg = " === (%s of %s) Merging (%s::%s)" % \ |
41 |
(mergecount, len(mymergelist), pkg_key, y) |
42 |
@@ -5145,7 +5147,7 @@ |
43 |
prev_mtimes=ldpath_mtimes) |
44 |
if retval != os.EX_OK: |
45 |
return retval |
46 |
- self._dequeue_uninstall_tasks(ldpath_mtimes) |
47 |
+ self._dequeue_uninstall_tasks(mtimedb) |
48 |
retval = portage.merge(pkgsettings["CATEGORY"], |
49 |
pkgsettings["PF"], pkgsettings["D"], |
50 |
os.path.join(pkgsettings["PORTAGE_BUILDDIR"], |
51 |
@@ -5174,7 +5176,7 @@ |
52 |
portage.locks.unlockdir(catdir_lock) |
53 |
|
54 |
elif x[0]=="binary": |
55 |
- self._dequeue_uninstall_tasks(ldpath_mtimes) |
56 |
+ self._dequeue_uninstall_tasks(mtimedb) |
57 |
#merge the tbz2 |
58 |
mytbz2 = self.trees[myroot]["bintree"].getname(pkg_key) |
59 |
if "--getbinpkg" in self.myopts: |
60 |
|
61 |
-- |
62 |
gentoo-commits@l.g.o mailing list |