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>
This commit is contained in:
parent
c77e7b86aa
commit
297438e965
|
@ -117,7 +117,7 @@ python do_package_deb () {
|
|||
|
||||
controldir = os.path.join(root, 'DEBIAN')
|
||||
bb.utils.mkdirhier(controldir)
|
||||
os.chmod(controldir, 0755)
|
||||
os.chmod(controldir, 0o755)
|
||||
try:
|
||||
import codecs
|
||||
ctrlfile = codecs.open(os.path.join(controldir, 'control'), 'w', 'utf-8')
|
||||
|
@ -293,7 +293,7 @@ python do_package_deb () {
|
|||
scriptfile.write(scriptvar[pos:])
|
||||
scriptfile.write('\n')
|
||||
scriptfile.close()
|
||||
os.chmod(os.path.join(controldir, script), 0755)
|
||||
os.chmod(os.path.join(controldir, script), 0o755)
|
||||
|
||||
conffiles_str = ' '.join(get_conffiles(pkg, d))
|
||||
if conffiles_str:
|
||||
|
|
|
@ -225,7 +225,7 @@ python do_package_ipk () {
|
|||
raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
|
||||
scriptfile.write(scriptvar)
|
||||
scriptfile.close()
|
||||
os.chmod(os.path.join(controldir, script), 0755)
|
||||
os.chmod(os.path.join(controldir, script), 0o755)
|
||||
|
||||
conffiles_str = ' '.join(get_conffiles(pkg, d))
|
||||
if conffiles_str:
|
||||
|
|
|
@ -63,7 +63,7 @@ def write_rpm_perfiledata(srcname, d):
|
|||
dump_filerdeps('RDEPENDS', dependsfile, d)
|
||||
|
||||
dependsfile.close()
|
||||
os.chmod(outdepends, 0755)
|
||||
os.chmod(outdepends, 0o755)
|
||||
|
||||
# OE-core / RPM Provides
|
||||
outprovides = workdir + "/" + srcname + ".provides"
|
||||
|
@ -76,7 +76,7 @@ def write_rpm_perfiledata(srcname, d):
|
|||
dump_filerdeps('RPROVIDES', providesfile, d)
|
||||
|
||||
providesfile.close()
|
||||
os.chmod(outprovides, 0755)
|
||||
os.chmod(outprovides, 0o755)
|
||||
|
||||
return (outdepends, outprovides)
|
||||
|
||||
|
@ -702,7 +702,7 @@ python do_package_rpm () {
|
|||
pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
|
||||
magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
|
||||
bb.utils.mkdirhier(pkgwritedir)
|
||||
os.chmod(pkgwritedir, 0755)
|
||||
os.chmod(pkgwritedir, 0o755)
|
||||
|
||||
cmd = rpmbuild
|
||||
cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
|
||||
|
|
|
@ -841,8 +841,8 @@ def check_sanity_everybuild(status, d):
|
|||
|
||||
check_supported_distro(d)
|
||||
|
||||
omask = os.umask(022)
|
||||
if omask & 0755:
|
||||
omask = os.umask(0o022)
|
||||
if omask & 0o755:
|
||||
status.addresult("Please use a umask which allows a+rx and u+rwx\n")
|
||||
os.umask(omask)
|
||||
|
||||
|
|
|
@ -655,9 +655,9 @@ python sstate_task_postfunc () {
|
|||
sstate_install(shared_state, d)
|
||||
for intercept in shared_state['interceptfuncs']:
|
||||
bb.build.exec_func(intercept, d, (d.getVar("WORKDIR", True),))
|
||||
omask = os.umask(002)
|
||||
if omask != 002:
|
||||
bb.note("Using umask 002 (not %0o) for sstate packaging" % omask)
|
||||
omask = os.umask(0o002)
|
||||
if omask != 0o002:
|
||||
bb.note("Using umask 0o002 (not %0o) for sstate packaging" % omask)
|
||||
sstate_package(shared_state, d)
|
||||
os.umask(omask)
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ def emit_terminal_func(command, envdata, d):
|
|||
bb.data.emit_func(cmd_func, script, envdata)
|
||||
script.write(cmd_func)
|
||||
script.write("\n")
|
||||
os.chmod(runfile, 0755)
|
||||
os.chmod(runfile, 0o755)
|
||||
|
||||
return runfile
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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('/'),
|
||||
|
|
Loading…
Reference in New Issue