diff options
Diffstat (limited to 'scripts/lib/wic/utils/partitionedfs.py')
-rw-r--r-- | scripts/lib/wic/utils/partitionedfs.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index b9fbc16e12..40d6e889b0 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py | |||
@@ -40,13 +40,13 @@ class Image: | |||
40 | An Image is a container for a set of DiskImages and associated | 40 | An Image is a container for a set of DiskImages and associated |
41 | partitions. | 41 | partitions. |
42 | """ | 42 | """ |
43 | def __init__(self): | 43 | def __init__(self, native_sysroot=None): |
44 | self.disks = {} | 44 | self.disks = {} |
45 | self.partitions = [] | 45 | self.partitions = [] |
46 | self.parted = find_binary_path("parted") | ||
47 | # Size of a sector used in calculations | 46 | # Size of a sector used in calculations |
48 | self.sector_size = SECTOR_SIZE | 47 | self.sector_size = SECTOR_SIZE |
49 | self._partitions_layed_out = False | 48 | self._partitions_layed_out = False |
49 | self.native_sysroot = native_sysroot | ||
50 | 50 | ||
51 | def __add_disk(self, disk_name): | 51 | def __add_disk(self, disk_name): |
52 | """ Add a disk 'disk_name' to the internal list of disks. Note, | 52 | """ Add a disk 'disk_name' to the internal list of disks. Note, |
@@ -225,11 +225,12 @@ class Image: | |||
225 | def __run_parted(self, args): | 225 | def __run_parted(self, args): |
226 | """ Run parted with arguments specified in the 'args' list. """ | 226 | """ Run parted with arguments specified in the 'args' list. """ |
227 | 227 | ||
228 | args.insert(0, self.parted) | 228 | args.insert(0, "parted") |
229 | args = ' '.join(args) | ||
229 | msger.debug(args) | 230 | msger.debug(args) |
230 | 231 | ||
231 | rc, out = runner.runtool(args, catch = 3) | 232 | rc, out = exec_native_cmd(args, self.native_sysroot) |
232 | out = out.strip() | 233 | |
233 | if out: | 234 | if out: |
234 | msger.debug('"parted" output: %s' % out) | 235 | msger.debug('"parted" output: %s' % out) |
235 | 236 | ||