diff options
Diffstat (limited to 'poky/scripts/lib')
-rw-r--r-- | poky/scripts/lib/devtool/search.py | 5 | ||||
-rw-r--r-- | poky/scripts/lib/recipetool/append.py | 8 | ||||
-rw-r--r-- | poky/scripts/lib/recipetool/create.py | 4 | ||||
-rw-r--r-- | poky/scripts/lib/recipetool/create_buildsys_python.py | 2 | ||||
-rw-r--r-- | poky/scripts/lib/wic/help.py | 5 | ||||
-rw-r--r-- | poky/scripts/lib/wic/ksparser.py | 1 | ||||
-rw-r--r-- | poky/scripts/lib/wic/partition.py | 5 | ||||
-rw-r--r-- | poky/scripts/lib/wic/plugins/source/rootfs.py | 2 |
8 files changed, 19 insertions, 13 deletions
diff --git a/poky/scripts/lib/devtool/search.py b/poky/scripts/lib/devtool/search.py index d81cdd876..70b81cac5 100644 --- a/poky/scripts/lib/devtool/search.py +++ b/poky/scripts/lib/devtool/search.py @@ -62,10 +62,11 @@ def search(args, config, basepath, workspace): with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f: for line in f: if ': ' in line: - splitline = line.split(':', 1) + splitline = line.split(': ', 1) key = splitline[0] value = splitline[1].strip() - if key in ['PKG:%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'): + key = key.replace(":" + pkg, "") + if key in ['PKG', 'DESCRIPTION', 'FILES_INFO', 'FILERPROVIDES']: if keyword_rc.search(value): match = True break diff --git a/poky/scripts/lib/recipetool/append.py b/poky/scripts/lib/recipetool/append.py index 5f629c07d..88ed8c5f0 100644 --- a/poky/scripts/lib/recipetool/append.py +++ b/poky/scripts/lib/recipetool/append.py @@ -72,15 +72,15 @@ def find_target_file(targetpath, d, pkglist=None): # This does assume that PN comes before other values, but that's a fairly safe assumption for line in f: if line.startswith('PN:'): - pn = line.split(':', 1)[1].strip() - elif line.startswith('FILES_INFO:'): - val = line.split(':', 1)[1].strip() + pn = line.split(': ', 1)[1].strip() + elif line.startswith('FILES_INFO'): + val = line.split(': ', 1)[1].strip() dictval = json.loads(val) for fullpth in dictval.keys(): if fnmatch.fnmatchcase(fullpth, targetpath): recipes[targetpath].append(pn) elif line.startswith('pkg_preinst:') or line.startswith('pkg_postinst:'): - scriptval = line.split(':', 1)[1].strip().encode('utf-8').decode('unicode_escape') + scriptval = line.split(': ', 1)[1].strip().encode('utf-8').decode('unicode_escape') if 'update-alternatives --install %s ' % targetpath in scriptval: recipes[targetpath].append('?%s' % pn) elif targetpath_re.search(scriptval): diff --git a/poky/scripts/lib/recipetool/create.py b/poky/scripts/lib/recipetool/create.py index 0ac97e02e..5cd72ea0a 100644 --- a/poky/scripts/lib/recipetool/create.py +++ b/poky/scripts/lib/recipetool/create.py @@ -115,8 +115,8 @@ class RecipeHandler(object): for line in f: if line.startswith('PN:'): pn = line.split(':', 1)[-1].strip() - elif line.startswith('FILES_INFO:'): - val = line.split(':', 1)[1].strip() + elif line.startswith('FILES_INFO:%s:' % pkg): + val = line.split(': ', 1)[1].strip() dictval = json.loads(val) for fullpth in sorted(dictval): if fullpth.startswith(includedir) and fullpth.endswith('.h'): diff --git a/poky/scripts/lib/recipetool/create_buildsys_python.py b/poky/scripts/lib/recipetool/create_buildsys_python.py index fdd336603..8aa44650d 100644 --- a/poky/scripts/lib/recipetool/create_buildsys_python.py +++ b/poky/scripts/lib/recipetool/create_buildsys_python.py @@ -545,7 +545,7 @@ class PythonRecipeHandler(RecipeHandler): with open(pkgdatafile, 'r') as f: for line in f.readlines(): field, value = line.split(': ', 1) - if field == 'FILES_INFO': + if field.startswith('FILES_INFO'): files_info = ast.literal_eval(value) break else: diff --git a/poky/scripts/lib/wic/help.py b/poky/scripts/lib/wic/help.py index 991e5094b..991907d3f 100644 --- a/poky/scripts/lib/wic/help.py +++ b/poky/scripts/lib/wic/help.py @@ -637,7 +637,7 @@ DESCRIPTION oe-core: directdisk.bbclass and mkefidisk.sh. The difference between wic and those examples is that with wic the functionality of those scripts is implemented by a general-purpose partitioning - 'language' based on Redhat kickstart syntax). + 'language' based on Red Hat kickstart syntax). The initial motivation and design considerations that lead to the current tool are described exhaustively in Yocto Bug #3847 @@ -991,6 +991,9 @@ DESCRIPTION multiple partitions and we want to keep the right permissions and usernames in all the partitions. + --no-fstab-update: This option is specific to wic. It does not update the + '/etc/fstab' stock file for the given partition. + --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 diff --git a/poky/scripts/lib/wic/ksparser.py b/poky/scripts/lib/wic/ksparser.py index 7a4cc83af..0df9eb0d0 100644 --- a/poky/scripts/lib/wic/ksparser.py +++ b/poky/scripts/lib/wic/ksparser.py @@ -185,6 +185,7 @@ class KickStart(): part.add_argument('--use-uuid', action='store_true') part.add_argument('--uuid') part.add_argument('--fsuuid') + part.add_argument('--no-fstab-update', action='store_true') bootloader = subparsers.add_parser('bootloader') bootloader.add_argument('--append') diff --git a/poky/scripts/lib/wic/partition.py b/poky/scripts/lib/wic/partition.py index e0b2c5bdf..ab304f1b2 100644 --- a/poky/scripts/lib/wic/partition.py +++ b/poky/scripts/lib/wic/partition.py @@ -54,6 +54,7 @@ class Partition(): self.uuid = args.uuid self.fsuuid = args.fsuuid self.type = args.type + self.no_fstab_update = args.no_fstab_update self.updated_fstab_path = None self.has_fstab = False self.update_fstab_in_rootfs = False @@ -286,7 +287,7 @@ class Partition(): (self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir) exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo) - if self.updated_fstab_path and self.has_fstab: + if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update: debugfs_script_path = os.path.join(cr_workdir, "debugfs_script") with open(debugfs_script_path, "w") as f: f.write("cd etc\n") @@ -350,7 +351,7 @@ class Partition(): mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir) exec_native_cmd(mcopy_cmd, native_sysroot) - if self.updated_fstab_path and self.has_fstab: + if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update: mcopy_cmd = "mcopy -i %s %s ::/etc/fstab" % (rootfs, self.updated_fstab_path) exec_native_cmd(mcopy_cmd, native_sysroot) diff --git a/poky/scripts/lib/wic/plugins/source/rootfs.py b/poky/scripts/lib/wic/plugins/source/rootfs.py index 96d940a91..2e34e715c 100644 --- a/poky/scripts/lib/wic/plugins/source/rootfs.py +++ b/poky/scripts/lib/wic/plugins/source/rootfs.py @@ -218,7 +218,7 @@ class RootfsPlugin(SourcePlugin): # Update part.has_fstab here as fstab may have been added or # removed by the above modifications. part.has_fstab = os.path.exists(os.path.join(new_rootfs, "etc/fstab")) - if part.update_fstab_in_rootfs and part.has_fstab: + if part.update_fstab_in_rootfs and part.has_fstab and not part.no_fstab_update: fstab_path = os.path.join(new_rootfs, "etc/fstab") # Assume that fstab should always be owned by root with fixed permissions install_cmd = "install -m 0644 %s %s" % (part.updated_fstab_path, fstab_path) |