summaryrefslogtreecommitdiff
path: root/morphlib/builder.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-02-27 09:42:04 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-02-27 09:42:04 +0000
commit44a6a4153021db189c8cf3ddbe4c5b89c8a29533 (patch)
tree8414941506894ab1ee932ef07be04d643b9346be /morphlib/builder.py
parent0d5b23d16b32df50a20f1083e15b46c16736e02b (diff)
downloadmorph-44a6a4153021db189c8cf3ddbe4c5b89c8a29533.tar.gz
morph: set mtime after submodule extract
Setting mtimes can fail if it is a symbolic link and it points to a non-existant file. This has happened when we had symbolic links pointing to files in a submodule, so we set mtimes after submodules have been checked out.
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r--morphlib/builder.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index d477d9e9..7fc944df 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -328,7 +328,6 @@ class ChunkBuilder(BlobBuilder):
morphlib.git.copy_repository(treeish, destdir, self.msg)
morphlib.git.checkout_ref(destdir, treeish.ref, self.msg)
- self.set_mtime_recursively(destdir)
for submodule in treeish.submodules:
directory = os.path.join(destdir, submodule.path)
@@ -342,6 +341,7 @@ class ChunkBuilder(BlobBuilder):
self.msg)
extract_treeish(self.blob.morph.treeish, self.builddir)
+ self.set_mtime_recursively(destdir)
def set_mtime_recursively(self, root):
'''Set the mtime for every file in a directory tree to the same.