1 |
Author: zmedico |
2 |
Date: 2008-11-02 20:04:30 +0000 (Sun, 02 Nov 2008) |
3 |
New Revision: 11802 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/vartree.py |
7 |
Log: |
8 |
Import shutil globally. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/portage/dbapi/vartree.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/portage/dbapi/vartree.py 2008-11-02 18:17:33 UTC (rev 11801) |
14 |
+++ main/trunk/pym/portage/dbapi/vartree.py 2008-11-02 20:04:30 UTC (rev 11802) |
15 |
@@ -30,7 +30,7 @@ |
16 |
from portage.elog import elog_process |
17 |
from portage.elog.filtering import filter_mergephases, filter_unmergephases |
18 |
|
19 |
-import os, re, stat, errno, copy, subprocess |
20 |
+import os, re, shutil, stat, errno, copy, subprocess |
21 |
import logging |
22 |
import shlex |
23 |
from itertools import izip |
24 |
@@ -1698,7 +1698,7 @@ |
25 |
writemsg("portage.dblink.delete(): invalid dbdir: %s\n" % \ |
26 |
self.dbdir, noiselevel=-1) |
27 |
return |
28 |
- import shutil |
29 |
+ |
30 |
shutil.rmtree(self.dbdir) |
31 |
self.vartree.dbapi._remove(self) |
32 |
|
33 |
@@ -2502,7 +2502,6 @@ |
34 |
del mylibs, mycontents, old_contents, liblist |
35 |
|
36 |
# inject files that should be preserved into our image dir |
37 |
- import shutil |
38 |
preserve_paths = [] |
39 |
candidates_stack = list(candidates) |
40 |
while candidates_stack: |
41 |
@@ -3706,7 +3705,7 @@ |
42 |
settings = self.settings |
43 |
base_path_orig = os.path.dirname(settings["PORTAGE_BIN_PATH"]) |
44 |
from tempfile import mkdtemp |
45 |
- import shutil |
46 |
+ |
47 |
# Make the temp directory inside PORTAGE_TMPDIR since, unlike |
48 |
# /tmp, it can't be mounted with the "noexec" option. |
49 |
base_path_tmp = mkdtemp("", "._portage_reinstall_.", |
50 |
@@ -3770,7 +3769,6 @@ |
51 |
return " ".join(mydata) |
52 |
|
53 |
def copyfile(self,fname): |
54 |
- import shutil |
55 |
shutil.copyfile(fname,self.dbdir+"/"+os.path.basename(fname)) |
56 |
|
57 |
def getfile(self,fname): |