Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] how to get started with automated update world
Date: Wed, 07 Jun 2017 21:08:15
Message-Id: 1942611.Vp0Cg3SM1k@dell_xps
In Reply to: Re: [gentoo-user] how to get started with automated update world by Rich Freeman
1 On Wednesday 07 Jun 2017 16:35:02 Rich Freeman wrote:
2 > On Wed, Jun 7, 2017 at 4:26 PM, Harry Putnam <reader@×××××××.com> wrote:
3 > > Maybe some of you can steer me toward some documentation or tools etc
4 > > that help a gentoo user to do automated updates.
5 >
6 > Unmonitored updates sounds like a recipe for problems. However, I do
7 > have a cron job that does a --sync and then builds binary packages for
8 > everything, and it emails me the emerge -pu output. Then if I'm happy
9 > with it I can just install the binary packages.
10 >
11 > To build everything (this could be cleaned up a bit or parallelized,
12 > and I stole it off of the lists):
13 > #!/bin/sh
14 >
15 > LIST=$(mktemp);
16 >
17 > emerge -puD --changed-use --color=n --columns --quiet=y --changed-deps
18 > --with-bdeps=n --backtrack=100 world | awk '{print $2}' > ${LIST};
19 >
20 > for PACKAGE in $(cat ${LIST});
21 > do
22 > printf "Building binary package for ${PACKAGE}... "
23 > emerge -uN --quiet-build --quiet=y --buildpkgonly ${PACKAGE};
24 > if [[ $? -eq 0 ]];
25 > then
26 > echo "ok";
27 > else
28 > echo "failed";
29 > fi
30 > done
31 >
32 > To install the packages you built:
33 > ionice -c 3 nice -n 15 emerge -uDkv --changed-use --keep-going
34 > --with-bdeps=n --changed-deps --binpkg-changed-deps=y --backtrack=100
35 > world
36 >
37 > Note that binary packages can only be built one level of dependencies
38 > deep, so if you're doing something like a kde update you'll still end
39 > up doing a LOT of building. Then again, it often takes care of some
40 > pretty big first-level dependencies like kdelibs. Typically over 80%
41 > of my package installs end up being from binaries, and often the stuff
42 > that isn't is small. If somebody triggers a rebuild of chromium then
43 > that is a different story, but most chromium updates get built
44 > overnight.
45
46 I have stayed away from automating updates because every now and then there
47 are profile changes, which add or remove USE flags. I prefer to consider
48 these, rather than have them applied automatically. I may also decide to hold
49 back some package updates for a while.
50 --
51 Regards,
52 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature