Andreas Sandberg has submitted this change and it was merged. ( https://gem5-review.googlesource.com/2660 )

Change subject: scons: Fix hook installation error caused by stale cache
......................................................................

scons: Fix hook installation error caused by stale cache

Due to the way SCons caches some file system state internally, it
sometimes "remembers" that a file or directory didn't exist at some
point. The git hook installation script sometimes needs to create a
hooks directory in the repository. Due to the cached state of the
hooks directory, the build system tries to create it twice. The second
mkdir operation leads to an error since the directory already exists.

Fix this issue by clearing the cached state of the hooks directory
after creating it.

Change-Id: I3f67f75c06ef928b439a0742f7619b7e92ed093b
Signed-off-by: Andreas Sandberg <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/2660
Reviewed-by: Gabe Black <[email protected]>
---
M SConstruct
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved
  Andreas Sandberg: Looks good to me, approved



diff --git a/SConstruct b/SConstruct
index ce53a51..6010f3a 100755
--- a/SConstruct
+++ b/SConstruct
@@ -399,6 +399,7 @@

         if not git_hooks.exists():
             mkdir(git_hooks.get_abspath())
+            git_hooks.clear()

         abs_symlink_hooks = git_hooks.islink() and \
             os.path.isabs(os.readlink(git_hooks.get_abspath()))

--
To view, visit https://gem5-review.googlesource.com/2660
To unsubscribe, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3f67f75c06ef928b439a0742f7619b7e92ed093b
Gerrit-Change-Number: 2660
Gerrit-PatchSet: 2
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to