1 |
On Tuesday, August 16, 2016 11:19:27 AM Rich Freeman wrote: |
2 |
> On Tue, Aug 16, 2016 at 11:02 AM, Michael Mol <mikemol@×××××.com> wrote: |
3 |
> > My workstation updates on a cron job every day at 6PM. I check my email in |
4 |
> > the morning to see if it ran into any trouble, correct whatever it |
5 |
> > complained about, and let it try again the next evening. |
6 |
> |
7 |
> I think you're better-off building binary packages at night and |
8 |
> installing them during the day. I'm not really keen on having Portage |
9 |
> do whatever it wants. It doesn't happen all that often but sometimes |
10 |
> I end up with a proposed downgrade that I'd prefer that it not do. |
11 |
> |
12 |
> I can't tell you who I stole this script from (one of the lists): |
13 |
> |
14 |
> #!/bin/sh |
15 |
> |
16 |
> LIST=$(mktemp); |
17 |
> |
18 |
> emerge -puD --changed-use --color=n --columns --quiet=y --changed-deps |
19 |
> --with-bdeps=n 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 |
> It can only get one level deep when there are dependencies. So, if |
34 |
> you have a KDE update you'll still do a lot of building during the |
35 |
> day. But, at least you won't be building kdelibs. And this is really |
36 |
> nice when chromium comes along with an update. |
37 |
|
38 |
So, here's my crontab entry. It's not necessarily the most efficient, but since I'm not around |
39 |
to wait on it, I don't really care; it works. |
40 |
|
41 |
*0 18 * * ** */usr/bin/eix-sync >/dev/null; /usr/bin/glsa-check --list ; /usr/sbin/perl-cleaner |
42 |
all ; /usr/sbin/python-updater ; /usr/sbin/haskell-updater ; /usr/bin/emerge -uDN @wor* |
43 |
|
44 |
The eix-sync, when backed by git, is really, really, really noisy, so I >/dev/null it. There's a |
45 |
ridiculous amount of stuff in the output every night. Though that may be because of my |
46 |
EMERGE_DEFAULT_OPTS: |
47 |
|
48 |
*EMERGE_DEFAULT_OPTS*=*"--tree --with-bdeps=y --keep-going --quiet-build=y --deep -- |
49 |
unordered-display --load-average 3 --jobs=3 --rebuild-if-new-slot y"* |
50 |
|
51 |
In the end, it's been working for me for quite a long time. I've been doing this (or |
52 |
something like it) for well over a year without it hosing my system. I even have it rolling |
53 |
updating KDE Plasma, KDE Applications, KDE Frameworks and Qt, though that takes about |
54 |
450 lines in packages.accept_keywords. |
55 |
|
56 |
If I were to automate something for servers, it'd be a much more intense process, with |
57 |
tight constraints on versioning, integration with application unit tests and further integration |
58 |
tests at each step. (Something I'd absolutely *love* to do, but no way I'm going to have |
59 |
time for setting that up right now. So it's yum-cron on non-critical servers, and manual |
60 |
zoned rolling updates on critical ones.) |
61 |
|
62 |
-- |
63 |
:wq |