summaryrefslogtreecommitdiff
path: root/morphlib/stagingarea.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-04-27 18:43:49 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2012-04-27 18:43:49 +0100
commit29f35250b009101a3ac86353da9512879ecface3 (patch)
tree95024231b2591c2066e0c8a481e41b3bb5cb72ac /morphlib/stagingarea.py
parent8387cb4321bcb151ed5b85e458d74484c0a3539d (diff)
downloadmorph-29f35250b009101a3ac86353da9512879ecface3.tar.gz
stagingarea: when extracting, clobber output
I really don't like this, but it causes the bootstrap to fail because /bin/bash exists for compatibility and the stratum also creates /bin/bash.
Diffstat (limited to 'morphlib/stagingarea.py')
-rw-r--r--morphlib/stagingarea.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index d0eec599..f730fd51 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -103,6 +103,9 @@ class StagingArea(object):
def monkey_patcher(real):
def make_something(tarinfo, targetpath): # pragma: no cover
+ if os.path.exists(targetpath):
+ try: os.remove(targetpath)
+ except: pass
try:
return real(tarinfo, targetpath)
except OSError, e: