diff options
| author | Kevin Hao <kexin.hao@windriver.com> | 2018-09-12 08:44:46 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-13 07:42:28 +0100 |
| commit | 821711bf2edc3d2eb5a695653ff5d439f43520be (patch) | |
| tree | 6083410a9373b1c0235c58521bd59ef5076bdad0 /scripts/lib/wic/ksparser.py | |
| parent | 92bc2b3e84f71871878ae6137ae08af7cb981ed0 (diff) | |
| download | poky-821711bf2edc3d2eb5a695653ff5d439f43520be.tar.gz | |
wic: Introduce the --use-label partition parameter
We can use this parameter to make the wic use the label to name a
partition in /etc/fstab.
(From OE-Core rev: 51638edaa00befaed58e2def255d46ae44d9234f)
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/ksparser.py')
| -rw-r--r-- | scripts/lib/wic/ksparser.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index a5d29189b9..7e5a9c5092 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py | |||
| @@ -141,6 +141,7 @@ class KickStart(): | |||
| 141 | 'squashfs', 'vfat', 'msdos', 'swap')) | 141 | 'squashfs', 'vfat', 'msdos', 'swap')) |
| 142 | part.add_argument('--mkfs-extraopts', default='') | 142 | part.add_argument('--mkfs-extraopts', default='') |
| 143 | part.add_argument('--label') | 143 | part.add_argument('--label') |
| 144 | part.add_argument('--use-label', action='store_true') | ||
| 144 | part.add_argument('--no-table', action='store_true') | 145 | part.add_argument('--no-table', action='store_true') |
| 145 | part.add_argument('--ondisk', '--ondrive', dest='disk', default='sda') | 146 | part.add_argument('--ondisk', '--ondrive', dest='disk', default='sda') |
| 146 | part.add_argument("--overhead-factor", type=overheadtype) | 147 | part.add_argument("--overhead-factor", type=overheadtype) |
| @@ -197,8 +198,17 @@ class KickStart(): | |||
| 197 | (confpath, lineno, err)) | 198 | (confpath, lineno, err)) |
| 198 | if line.startswith('part'): | 199 | if line.startswith('part'): |
| 199 | # SquashFS does not support filesystem UUID | 200 | # SquashFS does not support filesystem UUID |
| 200 | if parsed.fstype == 'squashfs' and parsed.fsuuid: | 201 | if parsed.fstype == 'squashfs': |
| 201 | err = "%s:%d: SquashFS does not support UUID" \ | 202 | if parsed.fsuuid: |
| 203 | err = "%s:%d: SquashFS does not support UUID" \ | ||
| 204 | % (confpath, lineno) | ||
| 205 | raise KickStartError(err) | ||
| 206 | if parsed.label: | ||
| 207 | err = "%s:%d: SquashFS does not support LABEL" \ | ||
| 208 | % (confpath, lineno) | ||
| 209 | raise KickStartError(err) | ||
| 210 | if parsed.use_label and not parsed.label: | ||
| 211 | err = "%s:%d: Must set the label with --label" \ | ||
| 202 | % (confpath, lineno) | 212 | % (confpath, lineno) |
| 203 | raise KickStartError(err) | 213 | raise KickStartError(err) |
| 204 | # using ArgumentParser one cannot easily tell if option | 214 | # using ArgumentParser one cannot easily tell if option |
