]> code.ossystems Code Review - openembedded-core.git/commitdiff
Revert "wic: Add --embed-rootfs argument"
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 Apr 2020 20:52:15 +0000 (21:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 7 Apr 2020 20:57:11 +0000 (21:57 +0100)
This reverts commit efdcf94801f6abe8e4099e324d9a3deccd8d4384.

After discussion on the mailing list it was felt these
changes were not ready yet.

scripts/lib/wic/help.py
scripts/lib/wic/ksparser.py
scripts/lib/wic/partition.py
scripts/lib/wic/plugins/source/rootfs.py

index f1afd903ac896611c40f138c5b2024e714613a02..1e3d06a87b4fab496746a1a98cb52593ebb2054f 100644 (file)
@@ -980,14 +980,6 @@ DESCRIPTION
                          copies. This option only has an effect with the rootfs
                          source plugin.
 
-         --embed-rootfs: This option is specific to wic. It embeds a rootfs into
-                         the given path to the resulting image. The option
-                         contains two fields, the roofs and the path, separated
-                         by a space. The rootfs follows the same logic as the
-                         rootfs-dir argument. Multiple options can be provided
-                         in order to embed multiple rootfs. This option only has
-                         an effect with the rootfs source plugin.
-
          --extra-space: This option is specific to wic. It adds extra
                         space after the space filled by the content
                         of the partition. The final size can go
index 64c8c1175ee665bd88f2514ffd6a705063737b9c..650b976223e03a24a70c93f7c8b95b1d279262fc 100644 (file)
@@ -138,7 +138,6 @@ class KickStart():
         part.add_argument('--align', type=int)
         part.add_argument('--exclude-path', nargs='+')
         part.add_argument('--include-path', nargs='+')
-        part.add_argument('--embed-rootfs', nargs=2, action='append')
         part.add_argument("--extra-space", type=sizetype)
         part.add_argument('--fsoptions', dest='fsopts')
         part.add_argument('--fstype', default='vfat',
index 13857df82f0cb44987072dc25f58919b8fb8239b..2d95f78439b436b1077d3bf95073f56f0f3ea6fe 100644 (file)
@@ -31,7 +31,6 @@ class Partition():
         self.extra_space = args.extra_space
         self.exclude_path = args.exclude_path
         self.include_path = args.include_path
-        self.embed_rootfs = args.embed_rootfs
         self.fsopts = args.fsopts
         self.fstype = args.fstype
         self.label = args.label
index 089aaea477f6c29048bb76acb095cadda239909d..40419a64b361cb854d3b51ec37fb97dfc1a96fc1 100644 (file)
@@ -17,7 +17,6 @@ import shutil
 import sys
 
 from oe.path import copyhardlinktree, copytree
-from pathlib import Path
 
 from wic import WicError
 from wic.pluginbase import SourcePlugin
@@ -81,7 +80,7 @@ class RootfsPlugin(SourcePlugin):
 
         new_rootfs = None
         # Handle excluded paths.
-        if part.exclude_path or part.include_path or part.embed_rootfs:
+        if part.exclude_path or part.include_path:
             # We need a new rootfs directory we can delete files from. Copy to
             # workdir.
             new_rootfs = os.path.realpath(os.path.join(cr_workdir, "rootfs%d" % part.lineno))
@@ -101,25 +100,6 @@ class RootfsPlugin(SourcePlugin):
             for path in part.include_path or []:
                 copyhardlinktree(path, new_rootfs)
 
-            for embed in part.embed_rootfs or []:
-                [embed_rootfs, path] = embed
-                #we need to remove the initial / for os.path.join to work
-                if os.path.isabs(path):
-                    path = path[1:]
-                if embed_rootfs in krootfs_dir:
-                    embed_rootfs = krootfs_dir[embed_rootfs]
-                embed_rootfs = cls.__get_rootfs_dir(embed_rootfs)
-                tar_file = os.path.realpath(os.path.join(cr_workdir, "aux.tar"))
-                tar_cmd = "%s tar cpf %s -C %s ." % (cls.__get_pseudo(native_sysroot,
-                                                     embed_rootfs), tar_file, embed_rootfs)
-                exec_native_cmd(tar_cmd, native_sysroot)
-                untar_cmd = "%s tar xf %s -C %s ." % (cls.__get_pseudo(native_sysroot, new_rootfs),
-                                                      tar_file, os.path.join(new_rootfs, path))
-                Path(os.path.join(new_rootfs, path)).mkdir(parents=True, exist_ok=True)
-                exec_native_cmd(untar_cmd, native_sysroot,
-                                cls.__get_pseudo(native_sysroot, new_rootfs))
-                os.remove(tar_file)
-
             for orig_path in part.exclude_path or []:
                 path = orig_path
                 if os.path.isabs(path):