mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
package.bbclass: Fix up bb.mkdirhier/bb.copyfile usage
These are in bb.utils so lets the correct function and avoid the overhead of the fixup/warning for the deprecated usage. (From OE-Core rev: d17329db4842c50af1a3d7f5f20e692c89913fba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -253,7 +253,7 @@ def splitdebuginfo(file, debugfile, debugsrcdir, d):
|
|||||||
if debugsrcdir:
|
if debugsrcdir:
|
||||||
subprocess.call("'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (debugedit, workparentdir, debugsrcdir, sourcefile, file), shell=True)
|
subprocess.call("'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (debugedit, workparentdir, debugsrcdir, sourcefile, file), shell=True)
|
||||||
|
|
||||||
bb.mkdirhier(os.path.dirname(debugfile))
|
bb.utils.mkdirhier(os.path.dirname(debugfile))
|
||||||
|
|
||||||
subprocess.call("'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile), shell=True)
|
subprocess.call("'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile), shell=True)
|
||||||
|
|
||||||
@@ -287,7 +287,7 @@ def copydebugsources(debugsrcdir, d):
|
|||||||
basepath = basepath + "/" + p
|
basepath = basepath + "/" + p
|
||||||
if not os.path.exists(basepath):
|
if not os.path.exists(basepath):
|
||||||
nosuchdir.append(basepath)
|
nosuchdir.append(basepath)
|
||||||
bb.mkdirhier(basepath)
|
bb.utils.mkdirhier(basepath)
|
||||||
|
|
||||||
processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
|
processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
|
||||||
# We need to ignore files that are not actually ours
|
# We need to ignore files that are not actually ours
|
||||||
@@ -644,7 +644,7 @@ python fixup_perms () {
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Create path to move directory to, move it, and then setup the symlink
|
# Create path to move directory to, move it, and then setup the symlink
|
||||||
bb.mkdirhier(os.path.dirname(target))
|
bb.utils.mkdirhier(os.path.dirname(target))
|
||||||
#bb.note("Fixup Perms: Rename %s -> %s" % (dir, ptarget))
|
#bb.note("Fixup Perms: Rename %s -> %s" % (dir, ptarget))
|
||||||
os.rename(origin, target)
|
os.rename(origin, target)
|
||||||
#bb.note("Fixup Perms: Link %s -> %s" % (dir, link))
|
#bb.note("Fixup Perms: Link %s -> %s" % (dir, link))
|
||||||
@@ -891,7 +891,7 @@ python populate_packages () {
|
|||||||
packages = d.getVar('PACKAGES', True)
|
packages = d.getVar('PACKAGES', True)
|
||||||
pn = d.getVar('PN', True)
|
pn = d.getVar('PN', True)
|
||||||
|
|
||||||
bb.mkdirhier(outdir)
|
bb.utils.mkdirhier(outdir)
|
||||||
os.chdir(dvar)
|
os.chdir(dvar)
|
||||||
|
|
||||||
# Sanity check PACKAGES for duplicates and for LICENSE_EXCLUSION
|
# Sanity check PACKAGES for duplicates and for LICENSE_EXCLUSION
|
||||||
@@ -914,7 +914,7 @@ python populate_packages () {
|
|||||||
|
|
||||||
for pkg in package_list:
|
for pkg in package_list:
|
||||||
root = os.path.join(pkgdest, pkg)
|
root = os.path.join(pkgdest, pkg)
|
||||||
bb.mkdirhier(root)
|
bb.utils.mkdirhier(root)
|
||||||
|
|
||||||
filesvar = d.getVar('FILES_%s' % pkg, True) or d.getVar('FILES', True) or ""
|
filesvar = d.getVar('FILES_%s' % pkg, True) or d.getVar('FILES', True) or ""
|
||||||
if "//" in filesvar:
|
if "//" in filesvar:
|
||||||
@@ -945,7 +945,7 @@ python populate_packages () {
|
|||||||
def mkdir(src, dest, p):
|
def mkdir(src, dest, p):
|
||||||
src = os.path.join(src, p)
|
src = os.path.join(src, p)
|
||||||
dest = os.path.join(dest, p)
|
dest = os.path.join(dest, p)
|
||||||
bb.mkdirhier(dest)
|
bb.utils.mkdirhier(dest)
|
||||||
fstat = os.stat(src)
|
fstat = os.stat(src)
|
||||||
os.chmod(dest, fstat.st_mode)
|
os.chmod(dest, fstat.st_mode)
|
||||||
os.chown(dest, fstat.st_uid, fstat.st_gid)
|
os.chown(dest, fstat.st_uid, fstat.st_gid)
|
||||||
@@ -975,7 +975,7 @@ python populate_packages () {
|
|||||||
os.chmod(fpath, fstat.st_mode)
|
os.chmod(fpath, fstat.st_mode)
|
||||||
os.chown(fpath, fstat.st_uid, fstat.st_gid)
|
os.chown(fpath, fstat.st_uid, fstat.st_gid)
|
||||||
continue
|
continue
|
||||||
ret = bb.copyfile(file, fpath)
|
ret = bb.utils.copyfile(file, fpath)
|
||||||
if ret is False or ret == 0:
|
if ret is False or ret == 0:
|
||||||
raise bb.build.FuncFailed("File population failed")
|
raise bb.build.FuncFailed("File population failed")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user