Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] how to get started with automated update world Mick <michaelkintzios@×××××.com>