public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael <confabulate@kintzios.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Question about emerge sync and where it all goes.
Date: Mon, 25 Mar 2024 09:23:40 +0000	[thread overview]
Message-ID: <5927132.MhkbZ0Pkbq@rogueboard> (raw)
In-Reply-To: <f42db4ce-0aff-e944-3b17-8a61444d922c@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2804 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-03-25  9:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25  2:58 [gentoo-user] Question about emerge sync and where it all goes Dale
2024-03-25  9:23 ` Michael [this message]
2024-03-26  0:37   ` Dale
2024-03-26  9:38     ` Michael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5927132.MhkbZ0Pkbq@rogueboard \
    --to=confabulate@kintzios.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox