Closed thirtythreeforty closed 5 years ago
I think I'd prefer something like this:
genimage.tmp/
root/ <-- the existing root directory
mp-root/ <-- the overlay
Or any other prefix. The directory name is already generated anyways to flatten subdirectories, so this should be a very simple change in add_mountpoint()
.
Yeah it wouldn't be too bad. I think an mp-
prefix would work too... What would happen if I decided to add a mount point of /home/myuser
? How would that look?
This is handled by path_sanitized()
, so (with the proposed change) this will be genimage.tmp/mp-home-myuser/
.
In theory, there are still collisions possible (/home/myuser/
and /home-myuser/
) but I don't think this is really a problem.
Gotcha. Yes, collisions will be rare. And that "problem" (however serious you deem it) is orthogonal to this issue anyway.
So mp-
sounds good. Would you like a PR, or would you prefer to make the change yourself?
A PR would be great.
I have tried to add a separate partition mounted at
/root
:This produces an error:
It appears genimage is copying the various partitions into the same folder as the root filesystem, which is contained in a folder named "root." This conflicts with the mountpoint name.
I think the best way to fix this (and not just kick the can to some other more obscure name) is to add another directory alongside: