[entropy.spm] PortagePlugin._pkg_remove_setup_ebuild_env: check file availability before calling shutil.copy2

This commit is contained in:
Fabio Erculiani
2010-06-25 21:13:24 +02:00
parent 6422f951e0
commit 21cf951b98
@@ -1925,7 +1925,9 @@ class PortagePlugin(SpmPlugin):
for item in items:
myfrom = os.path.join(ebuild_dir, item)
myto = os.path.join(dest_dir, item)
shutil.copy2(myfrom, myto)
if os.path.isfile(myfrom) and os.access(myfrom, os.R_OK):
# make sure it is readable before copying
shutil.copy2(myfrom, myto)
newmyebuild = os.path.join(dest_dir, ebuild_file)
if os.path.isfile(newmyebuild):