mirror of
https://git.yoctoproject.org/poky
synced 2026-09-13 18:49:33 +02:00
Revert "wic: Fix permissions when using exclude or include path"
This reverts commit 36993eea89d1c011397b7692b9b8d61b499d0171. After discussion on the mailing list it was felt these changes were not ready yet. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -16,11 +16,11 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oe.path import copyhardlinktree, copytree
|
from oe.path import copyhardlinktree
|
||||||
|
|
||||||
from wic import WicError
|
from wic import WicError
|
||||||
from wic.pluginbase import SourcePlugin
|
from wic.pluginbase import SourcePlugin
|
||||||
from wic.misc import get_bitbake_var, exec_native_cmd
|
from wic.misc import get_bitbake_var
|
||||||
|
|
||||||
logger = logging.getLogger('wic')
|
logger = logging.getLogger('wic')
|
||||||
|
|
||||||
@@ -44,15 +44,6 @@ class RootfsPlugin(SourcePlugin):
|
|||||||
|
|
||||||
return os.path.realpath(image_rootfs_dir)
|
return os.path.realpath(image_rootfs_dir)
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def __get_pseudo(native_sysroot, rootfs):
|
|
||||||
pseudo = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot
|
|
||||||
pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % os.path.join(rootfs, "../pseudo")
|
|
||||||
pseudo += "export PSEUDO_PASSWD=%s;" % rootfs
|
|
||||||
pseudo += "export PSEUDO_NOSYMLINKEXP=1;"
|
|
||||||
pseudo += "%s " % get_bitbake_var("FAKEROOTCMD")
|
|
||||||
return pseudo
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
def do_prepare_partition(cls, part, source_params, cr, cr_workdir,
|
||||||
oe_builddir, bootimg_dir, kernel_dir,
|
oe_builddir, bootimg_dir, kernel_dir,
|
||||||
@@ -87,15 +78,8 @@ class RootfsPlugin(SourcePlugin):
|
|||||||
|
|
||||||
if os.path.lexists(new_rootfs):
|
if os.path.lexists(new_rootfs):
|
||||||
shutil.rmtree(os.path.join(new_rootfs))
|
shutil.rmtree(os.path.join(new_rootfs))
|
||||||
copyhardlinktree(part.rootfs_dir, new_rootfs)
|
|
||||||
|
|
||||||
if os.path.lexists(os.path.join(new_rootfs, "../pseudo")):
|
copyhardlinktree(part.rootfs_dir, new_rootfs)
|
||||||
shutil.rmtree(os.path.join(new_rootfs, "../pseudo"))
|
|
||||||
copytree(os.path.join(part.rootfs_dir, "../pseudo"),
|
|
||||||
os.path.join(new_rootfs, "../pseudo"))
|
|
||||||
pseudo_cmd = "%s -B -m %s -M %s" % (cls.__get_pseudo(native_sysroot,new_rootfs),
|
|
||||||
part.rootfs_dir, new_rootfs)
|
|
||||||
exec_native_cmd(pseudo_cmd, native_sysroot)
|
|
||||||
|
|
||||||
for path in part.include_path or []:
|
for path in part.include_path or []:
|
||||||
copyhardlinktree(path, new_rootfs)
|
copyhardlinktree(path, new_rootfs)
|
||||||
|
|||||||
Reference in New Issue
Block a user