Originally discussed in mailing list thread: http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129036.html The motivation is to be able to generate multiple partitions using content from different parts of the rootfs filesystem. Current proposal is: This can be done by extending existing rootfs plugin. It should be able to do 2 things: - populate content of one rootfs directory to the partition. We can extend syntax of --rootfs-dir parameter to specify optional directory path to use - exclude rootfs directories when populating partitions. I'd propose to introduce --exclude-dirs wks parser option to handle this. Example of wks file with proposed new options: part / --source rootfs --rootfs-dir=core-image-minimal --ondisk sda --fstype=ext4 --label root --align 1024 --exclude-dirs data --exclude-dirs home part /data --source rootfs --rootfs-dir=core-image-minimal:/home --ondisk sda --fstype=ext4 --label data --align 1024 part /home --source rootfs --rootfs-dir=core-image-minimal:/data --ondisk sda --fstype=ext4 --label data --align 1024
On the mailing list, Maciej Borzecki pointed out that --exclude-dir may be a bad name since we do still want to the directory to be present. Can I suggest --exclude-content-of instead?
It makes thanks for me. Thanks for pointing out. What about a bit shorter name --exclude-content ?
--exclude-content it is!
Latest proposal is to use this syntax to exclude content or directories: --exclude-path data/* - exclude content, but keep the directory --exclude-path data - exclude directory and content --exclude-path data/tmp/t* - exclude files and directories that match wildcard --exclude-path data/db/tmp - exclude subdirectory and its content
Looks good to me. I'm still awaiting consensus on the mailing list, but I can start with the heart of the problem and make adjustments later. I'll get started on this tomorrow.
After further discussion on mailing list, latest proposal is to use rsync-style: --exclude-path data/ - exclude content, but keep the directory --exclude-path data - exclude directory and content --exclude-path data/db/tmp/ - exclude subdirectory content only --exclude-path data/db/tmp - exclude subdirectory and its content This doesn't necessarily invalidate the earlier glob proposal, but I will not focus on that in the first iteration at least.
Reassigning to Kristian as he'll be implementing this.
This is likely to be merged soon, but there was talk about having an exclude option for the do_image_ext4 and similar functions as well, in addition to wic. We are going to need both in Mender. Should this ticket cover that or should I make a new one?
Setting milestone to "Future" for now. This is ready to be merged, but I don't know when the maintainers will do that. It might need a rebase, but I'll look at that after the sysroot issues have died down a bit, I don't think anyone has any spare cycles ATM.
Cristian, can you rebase your changes on top of recent master and send them again for review? I'll try to push maintainers to merge them.
Thanks, Ed. I will repost shortly, I just need to retest them with the latest poky.
Rebased and retested patchset here: http://lists.openembedded.org/pipermail/openembedded-core/2017-February/132280.html
Kristian, thank you! I'll try to make sure your patchset is merged this time.
the patchset has been merged to master.
Thank you, Ed!