Merge lp://qastaging/~tom-gall/linaro-image-tools/reuse-partition into lp://qastaging/linaro-image-tools/11.11

Proposed by Tom Gall
Status: Rejected
Rejected by: Loïc Minier
Proposed branch: lp://qastaging/~tom-gall/linaro-image-tools/reuse-partition
Merge into: lp://qastaging/linaro-image-tools/11.11
Diff against target: 56 lines (+19/-6)
1 file modified
linaro-media-create (+19/-6)
To merge this branch: bzr merge lp://qastaging/~tom-gall/linaro-image-tools/reuse-partition
Reviewer Review Type Date Requested Status
Linaro Maintainers Pending
Review via email: mp+38294@code.qastaging.launchpad.net

Description of the change

I test out a fair number of images so having to partition, repartition and repartition again is a bit unnecessary.

This patch adds the --reuse-partitions flag which when combined with the --mmc flag will skip the partition step. It does prompt the user to validate the partition table as acceptable. If the user does not accept the partition table, the tool exists.

To post a comment you must log in.
Revision history for this message
Loïc Minier (lool) wrote :

I'm a bit scared that we add this type of features

However, it happens that a similar refactoring is happening for another reason

In:
https://code.launchpad.net/~mwaddel/linaro-image-tools/deploy-fs-options/+merge/38179
Matt re-arranges the code to be able to only write the boot or the root partition

I think we could support your use case elegantly by making the "create_partitions" step a separate one, and allow to specify steps on the command-line, so that you could run:
linaro-media-create --steps rootfs --device /dev/mmcblk0 [...]

Matt would be able to write:
linaro-media-create --steps create_partitions,boot --device /dev/mmcblk0 [...]
linaro-media-create --steps create_partitions,root --device /dev/sdb [...]

and regular users would run:
linaro-media-create --device /dev/mmcblk0 [...]
which would be the same as:
linaro-media-create --steps create_partitions,boot,root --device /dev/mmcblk0 [...]

I do object in general to add hacks/flags making the script more complex just for people rewriting their SD cards 30 times a day, but with the above approach it should not be a problem.

Would I be you, I'd have my own local mini-script which unpacks a binary.tgz into a device or something like that.

Revision history for this message
Tom Gall (tom-gall) wrote :

Matt's proposal could certainly fill this void however if l-m-c is going to evolve into something that is in steps I would advocate that each one of the steps identified should be individual scripts such that l-m-c then can call things in order and/or parallel order as appropriate.

This would further allow someone who is working with not quite supported hardware to find use in portions of the tool. It would also be more unix like where specific tools that do small things well as compared to one big tool with lots of complexity.

Example: if called individually
lmc_create_partitions <parms> ; lmc-format-partitions <parms>; lmc-setup-boot <parms>; lmc-setup-root <parms>

or linaro-media-create which then calls the simpler tools akin to live helper today.

Revision history for this message
Guilherme Salgado (salgado) wrote :

Hi Tom,

ISTM this is no longer needed as we now have the --no-part option?

Revision history for this message
Loïc Minier (lool) wrote :

Is this still relevant?

Revision history for this message
Tom Gall (tom-gall) wrote :

I do not believe this proposed patch is relevant anymore.

Unmerged revisions

141. By Tom Gall

add --reuse-partitions flag, valid when using MMC, reuses partition table that user affirms is correct

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches