View previous topic :: View next topic |
Author |
Message |
jeffss n00b

Joined: 13 Sep 2019 Posts: 59
|
Posted: Thu Feb 13, 2025 5:25 pm Post subject: about a newmount portage feature |
|
|
that is a flag that maybe could be useful for dependency calculations when trying to bootstrap a gentoo system elsewhere. A possibility could be to consider split portage databases, the one from the original system would be used for most operations, except for protecting installed packages and as a security measure portage could check before that those ROOT flags indeed point to a different location then that from where itself is being executed. It seems that portage can give some false negatives about collisions when building for a new environment about packages that are not present there anyway |
|
Back to top |
|
 |
pingtoo Veteran


Joined: 10 Sep 2021 Posts: 1506 Location: Richmond Hill, Canada
|
Posted: Thu Feb 13, 2025 5:36 pm Post subject: |
|
|
Can you use a example to elaborate more? I am having hard time to understand the concept you described. |
|
Back to top |
|
 |
jeffss n00b

Joined: 13 Sep 2019 Posts: 59
|
Posted: Thu Feb 13, 2025 5:56 pm Post subject: |
|
|
pingtoo wrote: | Can you use a example to elaborate more? I am having hard time to understand the concept you described. |
lets say you have an empty partition where you want to create a new root and you mount it on a directory like /mnt/other and you will transfer some misc files there at some point from the current system, all except the programs and libraries themselves. The first step would be to install all the bare minimum libraries and executables necessary for a sane functional environment, that part is less prone to issues. After it will be necessary to have a toolchain capable of compiling packages, so it will involve installing things like python, portage, (...), at that step if you are using a portage from the original root with its database of installed packages, then the security does not discriminate the current root from the root for where the packages are being installed, so it says something like "required package X conflicts with installed [package of original root]", as it will try to pull many base packages that are dependencies for the whole system |
|
Back to top |
|
 |
pingtoo Veteran


Joined: 10 Sep 2021 Posts: 1506 Location: Richmond Hill, Canada
|
Posted: Thu Feb 13, 2025 6:12 pm Post subject: |
|
|
So let me confirm my understand of your idea.
your concern is that your target area (/mnt/other) use certain USE flags that is different from your host (build env, where emerge command issued) and therefor some sort of conflict happen.
Do you have example?
The only thing I can think of that possible create situational like that is your target have setting that that require existing package (which is a build dependency) change that cause requite rebuild of the host environment.
My current solution is I create a copy of my host (the build env) then use (unshare/chroot or docker) to house the copy and from the isolated copy run emerge --root=/mnt/other ... and fix whatever necessary in the isolated copy to finish target build. |
|
Back to top |
|
 |
jeffss n00b

Joined: 13 Sep 2019 Posts: 59
|
Posted: Thu Feb 13, 2025 10:29 pm Post subject: |
|
|
pingtoo wrote: | So let me confirm my understand of your idea.
your concern is that your target area (/mnt/other) use certain USE flags that is different from your host (build env, where emerge command issued) and therefor some sort of conflict happen.
Do you have example?
The only thing I can think of that possible create situational like that is your target have setting that that require existing package (which is a build dependency) change that cause requite rebuild of the host environment.
My current solution is I create a copy of my host (the build env) then use (unshare/chroot or docker) to house the copy and from the isolated copy run emerge --root=/mnt/other ... and fix whatever necessary in the isolated copy to finish target build. |
oh I think I may have found something appropriate https://wiki.gentoo.org/wiki/Full_Source_Bootstrap . I just changed the last system upgrade to include the binpkg option and bindmounted the partition folder above that last chrooted environment before entering it, so that it is possible to safely rely on emerge to copy all the packages to the final destination |
|
Back to top |
|
 |
|