[gnome-builder] rustup: avoid os.chmod()



commit 5fb1e8863f1409f2c1772af287dc9508b026999c
Author: Christian Hergert <chergert redhat com>
Date:   Sun Feb 19 12:02:31 2017 -0800

    rustup: avoid os.chmod()
    
    This will pretty much never succeed in an installation because the file
    should be read-only.

 plugins/rustup/rustup_plugin/__init__.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/rustup/rustup_plugin/__init__.py b/plugins/rustup/rustup_plugin/__init__.py
index 3a490c8..8ee81dd 100644
--- a/plugins/rustup/rustup_plugin/__init__.py
+++ b/plugins/rustup/rustup_plugin/__init__.py
@@ -291,9 +291,11 @@ class RustupInstaller(Ide.Transfer):
         launcher.set_clear_env(False)
         if self.mode == _MODE_INSTALL:
             rustup_sh_path = get_module_data_path('resources/rustup.sh')
-            # ensure that the script is executable
-            st = os.stat(rustup_sh_path)
-            os.chmod(rustup_sh_path, st.st_mode | stat.S_IEXEC)
+            # XXX: ensure that the script is executable
+            #      this should not be neccessary now that we bundle rustup.sh
+            #      and its likely the script is read-only anyway.
+            # st = os.stat(rustup_sh_path)
+            # os.chmod(rustup_sh_path, st.st_mode | stat.S_IEXEC)
             launcher.push_argv(rustup_sh_path)
             # install default toolchain automatically
             launcher.push_argv('-y')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]