public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Distfiles cache setup
Date: Fri, 18 Sep 2015 21:15:32 +0100	[thread overview]
Message-ID: <20150918211532.6945fc67@digimed.co.uk> (raw)
In-Reply-To: <55FC43A3.1050005@gmail.com>

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

On Fri, 18 Sep 2015 10:02:27 -0700, Daniel Frey wrote:

> 2. Export the distfiles directory.

That's what I do.
 
> This seems to be a bit better of a solution, other than not being able
> to use it outside the LAN.

ZeroTier can take care of that, or a VPN if you feel like doing the work
yourself.

> However, cleaning this directory becomes a
> lot less trivial as tools used to clean it will assume that the current
> machine is the only machine using it and clobber other workstation's
> required distfiles.

How tight is space? eclean-dist only removes distfiles for packages that
are no longer in the tree. So you can run it on one system and keep
$DISTDIR reasonably trimmed. If you use the --package-names option, it
will do as you suggest and only keep files needed by the machine running
the command.

> I suppose the easiest way to sync is to wipe it completely out and run
> `emerge -fe world` on all machines to rebuild it, but this would be a
> fair bit of work as well.

If you run this on each computer

emerge -epf --usepkg=n world | awk '/^[fh]t?tps?\:\/\// {print $1}' | sort -u | while read f; do
        touch --no-create ${DISTDIR}/$(basename ${f})
        done

It will touch each file needed by an installed package. Then you can
simply delete all files more than a day old (or longer if you want to keep
some fallback)

find $DISTDIR -type f -mtime +3- -exec rm "{}" +


-- 
Neil Bothwick

Everyone has a photographic memory. Some don't have film.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2015-09-18 20:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 17:02 [gentoo-user] Distfiles cache setup Daniel Frey
2015-09-18 17:33 ` Peter Humphrey
2015-09-18 20:15 ` Neil Bothwick [this message]
2015-09-19  0:48   ` Daniel Frey
2015-09-20  8:07     ` Andrew Savchenko
2015-09-20 10:19       ` Marc Joliet
2015-09-19  4:39 ` hydra
2015-09-19 15:20   ` J. Roeleveld
2015-09-19 15:22 ` J. Roeleveld

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=20150918211532.6945fc67@digimed.co.uk \
    --to=neil@digimed.co.uk \
    --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