Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Side by Side Diff: buildbot/buildbot_lib.py

Issue 1050243003: Don't try to chmod symlinks. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import optparse 6 import optparse
7 import os.path 7 import os.path
8 import shutil 8 import shutil
9 import subprocess 9 import subprocess
10 import stat 10 import stat
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 Does not mask failures, although it does retry a few times on Windows. 352 Does not mask failures, although it does retry a few times on Windows.
353 """ 353 """
354 Retry(_RemoveDirectory, path) 354 Retry(_RemoveDirectory, path)
355 355
356 356
357 def RemovePath(path): 357 def RemovePath(path):
358 """Remove a path, file or directory.""" 358 """Remove a path, file or directory."""
359 if os.path.isdir(path): 359 if os.path.isdir(path):
360 RemoveDirectory(path) 360 RemoveDirectory(path)
361 else: 361 else:
362 os.chmod(path, stat.S_IWUSR) 362 if os.path.isfile(path) and not os.access(path, os.W_OK):
363 os.chmod(path, stat.S_IWUSR)
363 os.remove(path) 364 os.remove(path)
364 365
365 366
366 # This is a sanity check so Command can print out better error information. 367 # This is a sanity check so Command can print out better error information.
367 def FileCanBeFound(name, paths): 368 def FileCanBeFound(name, paths):
368 # CWD 369 # CWD
369 if os.path.exists(name): 370 if os.path.exists(name):
370 return True 371 return True
371 # Paths with directories are not resolved using the PATH variable. 372 # Paths with directories are not resolved using the PATH variable.
372 if os.path.dirname(name): 373 if os.path.dirname(name):
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 # Otherwise these go back to the preamble. 679 # Otherwise these go back to the preamble.
679 with Step('summary', status): 680 with Step('summary', status):
680 if status.ever_failed: 681 if status.ever_failed:
681 print 'There were failed stages.' 682 print 'There were failed stages.'
682 else: 683 else:
683 print 'Success.' 684 print 'Success.'
684 # Display a summary of the build. 685 # Display a summary of the build.
685 status.DisplayBuildStatus() 686 status.DisplayBuildStatus()
686 687
687 sys.exit(status.ReturnValue()) 688 sys.exit(status.ReturnValue())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698