From 297438e965053b2eb56cc8ef3e59465642f10a24 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 7 May 2013 11:23:40 +0100 Subject: classes/lib: Convert to use python3 octal syntax The syntax for octal values changed in python3, adapt to it. (From OE-Core rev: 737a095fcde773a36e0fee1f27b74aaa88062386) Signed-off-by: Richard Purdie --- meta/lib/oe/package_manager.py | 4 ++-- meta/lib/oe/patch.py | 4 ++-- meta/lib/oe/sdk.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'meta/lib') diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 79b3206621..3bc4ebf5b4 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -1090,8 +1090,8 @@ class RpmPM(PackageManager): native_root) open(self.scriptlet_wrapper, 'w+').write(scriptlet_content) - bb.note("Configuring RPM cross-install scriptlet_wrapper") - os.chmod(self.scriptlet_wrapper, 0755) + bb.note("configuring RPM cross-install scriptlet_wrapper") + os.chmod(self.scriptlet_wrapper, 0o755) cmd = 'config --set rpm-extra-macros._cross_scriptlet_wrapper=%s' % \ self.scriptlet_wrapper self._invoke_smart(cmd) diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 9d36172909..a25fd527f6 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -434,7 +434,7 @@ class GitApplyTree(PatchTree): # change other places which read it back f.write('echo >> $1\n') f.write('echo "%s: $PATCHFILE" >> $1\n' % GitApplyTree.patch_line_prefix) - os.chmod(commithook, 0755) + os.chmod(commithook, 0o755) shutil.copy2(commithook, applyhook) try: patchfilevar = 'PATCHFILE="%s"' % os.path.basename(patch['file']) @@ -672,7 +672,7 @@ class UserResolver(Resolver): f.write("echo 'Run \"quilt refresh\" when patch is corrected, press CTRL+D to exit.'\n") f.write("echo ''\n") f.write(" ".join(patchcmd) + "\n") - os.chmod(rcfile, 0775) + os.chmod(rcfile, 0o775) self.terminal("bash --rcfile " + rcfile, 'Patch Rejects: Please fix patch rejects manually', self.patchset.d) diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py index f1bbef6f58..4786cc5aac 100644 --- a/meta/lib/oe/sdk.py +++ b/meta/lib/oe/sdk.py @@ -251,12 +251,12 @@ class OpkgSdk(Sdk): self.mkdirhier(target_sysconfdir) shutil.copy(self.target_conf, target_sysconfdir) os.chmod(os.path.join(target_sysconfdir, - os.path.basename(self.target_conf)), 0644) + os.path.basename(self.target_conf)), 0o644) self.mkdirhier(host_sysconfdir) shutil.copy(self.host_conf, host_sysconfdir) os.chmod(os.path.join(host_sysconfdir, - os.path.basename(self.host_conf)), 0644) + os.path.basename(self.host_conf)), 0o644) native_opkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path, self.d.getVar('localstatedir_nativesdk', True).strip('/'), -- cgit 1.2.3-korg