On Monday, 25 March 2024 02:58:21 GMT Dale wrote: > Howdy, > > I've mentioned before that I build my packages in a chroot. I have a OS > copy on a separate drive. I do this because of the long compile times > of some packages. On occasion tho, I catch the tree in a bad place. > Some conflict or other happens and I need to sync again to get fixes > etc. Given my process tho, I don't want to sync the chroot without also > syncing my main system because the two will not be in sync and I'll lose > my update since it deletes files as well including any updates I did > emerge successfully. I need the two to be identical. So, I'd like to > sync my main system and then copy the new data over to the chroot > without copying the rest of the OS.
What you do is duplicating effort and storage space with questionable benefit, besides warming up your room. I think it would be more efficient if you used the same /var/cache/distfiles and /var/db/repos/ filesystems on both installations. This way you'd sync once and then download any source files once only. However, an even more optimised solution would be to compile packages once in your chrooted fs with the '--buildpkg y' option and then emerge these as binary packages from /var/cache/binpkgs/ in your production OS. An overnight emerge in the chrooted OS will take only a few minutes on the production system. > I did this with the following command earlier. > > rsync -av --progress --delete /var/cache/portage/tree/* > /backup/gentoo-build/var/cache/portage/tree/ Your syntax for the source tree will fail to copy a couple files immediately under /var/cache/portage/tree/ which start with "." It would be better if you used: /var/cache/portage/tree /backup/gentoo-build/var/cache/portage/tree > As you can see, my tree location is not the default. It is located at > /var/cache/portage/tree/. It's the same on the chroot obviously. Would > the above command copy all the needed files/directories over that it > needs after a emerge sync or is there more to it? The reason I think it > needs more, when I tried to do the usual emerge -aukDN world on my main > system, it wanted to emerge more packages than the chroot did. I > suspect there is more to it than just the tree directory. > > Anyone have the details on this? Anyone know what other > files/directories need to be copied over as well? > > Thanks. > > Dale > > :-) :-) Did you diff /var/lib/portage/world between the two systems to see what differences may be there? I can think of a hypothetical case where the chrooted fs may have already emerged build time dependencies, e.g. if some emerge failed and then you fixed/restarted it a number of times, but the production system would not yet have such build time dependencies installed.
signature.asc
Description: This is a digitally signed message part.