summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 11:23:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:00 +0100
commit297438e965053b2eb56cc8ef3e59465642f10a24 (patch)
tree74bd5fc54674b8cce870b35bd9e22d93eb00dcb6 /meta/classes
parentc77e7b86aa732e9acfa6409108756be38a3ca3ae (diff)
downloadpoky-297438e965053b2eb56cc8ef3e59465642f10a24.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_deb.bbclass4
-rw-r--r--meta/classes/package_ipk.bbclass2
-rw-r--r--meta/classes/package_rpm.bbclass6
-rw-r--r--meta/classes/sanity.bbclass4
-rw-r--r--meta/classes/sstate.bbclass6
-rw-r--r--meta/classes/terminal.bbclass2
6 files changed, 12 insertions, 12 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index e1d05a74c2..bb5220ed00 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -117,7 +117,7 @@ python do_package_deb () {
117 117
118 controldir = os.path.join(root, 'DEBIAN') 118 controldir = os.path.join(root, 'DEBIAN')
119 bb.utils.mkdirhier(controldir) 119 bb.utils.mkdirhier(controldir)
120 os.chmod(controldir, 0755) 120 os.chmod(controldir, 0o755)
121 try: 121 try:
122 import codecs 122 import codecs
123 ctrlfile = codecs.open(os.path.join(controldir, 'control'), 'w', 'utf-8') 123 ctrlfile = codecs.open(os.path.join(controldir, 'control'), 'w', 'utf-8')
@@ -293,7 +293,7 @@ python do_package_deb () {
293 scriptfile.write(scriptvar[pos:]) 293 scriptfile.write(scriptvar[pos:])
294 scriptfile.write('\n') 294 scriptfile.write('\n')
295 scriptfile.close() 295 scriptfile.close()
296 os.chmod(os.path.join(controldir, script), 0755) 296 os.chmod(os.path.join(controldir, script), 0o755)
297 297
298 conffiles_str = ' '.join(get_conffiles(pkg, d)) 298 conffiles_str = ' '.join(get_conffiles(pkg, d))
299 if conffiles_str: 299 if conffiles_str:
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index f1ad1d5c17..08f7020a9e 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -225,7 +225,7 @@ python do_package_ipk () {
225 raise bb.build.FuncFailed("unable to open %s script file for writing." % script) 225 raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
226 scriptfile.write(scriptvar) 226 scriptfile.write(scriptvar)
227 scriptfile.close() 227 scriptfile.close()
228 os.chmod(os.path.join(controldir, script), 0755) 228 os.chmod(os.path.join(controldir, script), 0o755)
229 229
230 conffiles_str = ' '.join(get_conffiles(pkg, d)) 230 conffiles_str = ' '.join(get_conffiles(pkg, d))
231 if conffiles_str: 231 if conffiles_str:
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7d523a16f8..f9398a9522 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -63,7 +63,7 @@ def write_rpm_perfiledata(srcname, d):
63 dump_filerdeps('RDEPENDS', dependsfile, d) 63 dump_filerdeps('RDEPENDS', dependsfile, d)
64 64
65 dependsfile.close() 65 dependsfile.close()
66 os.chmod(outdepends, 0755) 66 os.chmod(outdepends, 0o755)
67 67
68 # OE-core / RPM Provides 68 # OE-core / RPM Provides
69 outprovides = workdir + "/" + srcname + ".provides" 69 outprovides = workdir + "/" + srcname + ".provides"
@@ -76,7 +76,7 @@ def write_rpm_perfiledata(srcname, d):
76 dump_filerdeps('RPROVIDES', providesfile, d) 76 dump_filerdeps('RPROVIDES', providesfile, d)
77 77
78 providesfile.close() 78 providesfile.close()
79 os.chmod(outprovides, 0755) 79 os.chmod(outprovides, 0o755)
80 80
81 return (outdepends, outprovides) 81 return (outdepends, outprovides)
82 82
@@ -702,7 +702,7 @@ python do_package_rpm () {
702 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}') 702 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
703 magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc') 703 magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
704 bb.utils.mkdirhier(pkgwritedir) 704 bb.utils.mkdirhier(pkgwritedir)
705 os.chmod(pkgwritedir, 0755) 705 os.chmod(pkgwritedir, 0o755)
706 706
707 cmd = rpmbuild 707 cmd = rpmbuild
708 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd 708 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index a392bc29d1..addeab66c5 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -841,8 +841,8 @@ def check_sanity_everybuild(status, d):
841 841
842 check_supported_distro(d) 842 check_supported_distro(d)
843 843
844 omask = os.umask(022) 844 omask = os.umask(0o022)
845 if omask & 0755: 845 if omask & 0o755:
846 status.addresult("Please use a umask which allows a+rx and u+rwx\n") 846 status.addresult("Please use a umask which allows a+rx and u+rwx\n")
847 os.umask(omask) 847 os.umask(omask)
848 848
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6bf94b0ec7..994eae6eaa 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -655,9 +655,9 @@ python sstate_task_postfunc () {
655 sstate_install(shared_state, d) 655 sstate_install(shared_state, d)
656 for intercept in shared_state['interceptfuncs']: 656 for intercept in shared_state['interceptfuncs']:
657 bb.build.exec_func(intercept, d, (d.getVar("WORKDIR", True),)) 657 bb.build.exec_func(intercept, d, (d.getVar("WORKDIR", True),))
658 omask = os.umask(002) 658 omask = os.umask(0o002)
659 if omask != 002: 659 if omask != 0o002:
660 bb.note("Using umask 002 (not %0o) for sstate packaging" % omask) 660 bb.note("Using umask 0o002 (not %0o) for sstate packaging" % omask)
661 sstate_package(shared_state, d) 661 sstate_package(shared_state, d)
662 os.umask(omask) 662 os.umask(omask)
663} 663}
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 9f4c24e906..a94f755a40 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -29,7 +29,7 @@ def emit_terminal_func(command, envdata, d):
29 bb.data.emit_func(cmd_func, script, envdata) 29 bb.data.emit_func(cmd_func, script, envdata)
30 script.write(cmd_func) 30 script.write(cmd_func)
31 script.write("\n") 31 script.write("\n")
32 os.chmod(runfile, 0755) 32 os.chmod(runfile, 0o755)
33 33
34 return runfile 34 return runfile
35 35