Bug 1289249 - Set permissions of parent directory during --chown-recursive; r=dustin
authorGregory Szorc <gps@mozilla.com>
Thu, 29 Sep 2016 10:07:21 -0700
changeset 315987 6426086c4c0a538d8a2a4dd75ef8df6e1984ef49
parent 315986 13d0743bcaa67972a09e45472b161a787eceee7e
child 315988 db1b85faa8b06612fbe7fc536ac81a8090446ced
push id30758
push userphilringnalda@gmail.com
push dateSat, 01 Oct 2016 06:23:57 +0000
treeherdermozilla-central@b0706e5d7ae3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1289249
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289249 - Set permissions of parent directory during --chown-recursive; r=dustin os.walk() won't explicitly yield the root directory. So we need to update it explicitly when doing a recursive chown. MozReview-Commit-ID: JC0PNsk5gFK
testing/docker/recipes/run-task
--- a/testing/docker/recipes/run-task
+++ b/testing/docker/recipes/run-task
@@ -210,16 +210,19 @@ def main(args):
     for path in args.chown or []:
         print_line(b'chown', b'changing ownership of %s to %s:%s\n' % (
                    path, user.pw_name, group.gr_name))
         set_dir_permissions(path, uid, gid)
 
     for path in args.chown_recursive or []:
         print_line(b'chown', b'recursively changing ownership of %s to %s:%s\n' %
                    (path, user.pw_name, group.gr_name))
+
+        set_dir_permissions(path, uid, gid)
+
         for root, dirs, files in os.walk(path):
             for d in dirs:
                 set_dir_permissions(os.path.join(root, d), uid, gid)
 
             for f in files:
                 os.chown(os.path.join(root, f), uid, gid)
 
     checkout = args.vcs_checkout