summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-02 20:04:30 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-02 20:04:30 +0000
commitf97446c9c42f70acc30f855a679f601db88fba49 (patch)
tree8add9cc1e9acc8a3c25708400cfd2decb671b0e3
parenta8388fec92e122292c1acddd6a394b3e5682ad39 (diff)
downloadportage-f97446c9c42f70acc30f855a679f601db88fba49.tar.gz
portage-f97446c9c42f70acc30f855a679f601db88fba49.tar.bz2
portage-f97446c9c42f70acc30f855a679f601db88fba49.zip
Import shutil globally.
svn path=/main/trunk/; revision=11802
-rw-r--r--pym/portage/dbapi/vartree.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 2b9460462..0361bb3d9 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -30,7 +30,7 @@ from portage import listdir, dep_expand, digraph, flatten, key_expand, \
from portage.elog import elog_process
from portage.elog.filtering import filter_mergephases, filter_unmergephases
-import os, re, stat, errno, copy, subprocess
+import os, re, shutil, stat, errno, copy, subprocess
import logging
import shlex
from itertools import izip
@@ -1698,7 +1698,7 @@ class dblink(object):
writemsg("portage.dblink.delete(): invalid dbdir: %s\n" % \
self.dbdir, noiselevel=-1)
return
- import shutil
+
shutil.rmtree(self.dbdir)
self.vartree.dbapi._remove(self)
@@ -2502,7 +2502,6 @@ class dblink(object):
del mylibs, mycontents, old_contents, liblist
# inject files that should be preserved into our image dir
- import shutil
preserve_paths = []
candidates_stack = list(candidates)
while candidates_stack:
@@ -3706,7 +3705,7 @@ class dblink(object):
settings = self.settings
base_path_orig = os.path.dirname(settings["PORTAGE_BIN_PATH"])
from tempfile import mkdtemp
- import shutil
+
# Make the temp directory inside PORTAGE_TMPDIR since, unlike
# /tmp, it can't be mounted with the "noexec" option.
base_path_tmp = mkdtemp("", "._portage_reinstall_.",
@@ -3770,7 +3769,6 @@ class dblink(object):
return " ".join(mydata)
def copyfile(self,fname):
- import shutil
shutil.copyfile(fname,self.dbdir+"/"+os.path.basename(fname))
def getfile(self,fname):