Gentoo Archives: gentoo-user

From: Marc Joliet <marcec@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Use Flags and Updating
Date: Thu, 22 May 2014 07:55:04
Message-Id: 20140522095448.76d13462@marcec
In Reply to: Re: [gentoo-user] Use Flags and Updating by Rich Freeman
1 Am Wed, 21 May 2014 23:11:02 -0400
2 schrieb Rich Freeman <rich0@g.o>:
3
4 > On Wed, May 21, 2014 at 10:10 PM, <ny6p01@×××××.com> wrote:
5 > > I run a script that syncs portage, updates @world, depcleans, revdep-rebuild
6 > > and finally runs dispatch-conf -- about once weekly. Keeps my system in fine
7 > > trim. :)
8 >
9 > This one is a gem - I forget where I saw it (likely planet, but maybe
10 > it was on a list). Stick it in your crontab. I will warn you that
11 > sometimes it chokes on its own output and obviously it can't build
12 > binpkgs for anything more than one step down the dependency tree.
13 > However, when my weekly chromium build runs at 2AM and I can just
14 > install it (with -k) the next morning it is a nice thing indeed. You
15 > still get full control over USE flags/etc, but most of the convenience
16 > of a binary distro.
17 >
18 > #!/bin/sh
19 >
20 > LIST=$(mktemp);
21 >
22 > emerge -puD --changed-use --color=n --columns --quiet=y --with-bdeps=y
23 > world | awk '{print $2}' > ${LIST};
24 >
25 > for PACKAGE in $(cat ${LIST});
26 > do
27 > printf "Building binary package for ${PACKAGE}... "
28 > emerge -uN --quiet-build --quiet=y --buildpkgonly ${PACKAGE};
29 > if [[ $? -eq 0 ]];
30 > then
31 > echo "ok";
32 > else
33 > echo "failed";
34 > fi
35 > done
36
37 I think nowadays one would prefer --keep-going, which automatically resumes on
38 failure (and recomputes the dependency tree!), and prints a list of failed
39 packages when it's finished. However its output is more verbose than just "ok"
40 and "failed" (it'll print the build.log if it's only one package, IIRC).
41
42 --
43 Marc Joliet
44 --
45 "People who think they know everything really annoy those of us who know we
46 don't" - Bjarne Stroustrup

Attachments

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

Replies

Subject Author
Re: [gentoo-user] Use Flags and Updating Rich Freeman <rich0@g.o>
Re: [gentoo-user] Use Flags and Updating Rich Freeman <rich0@g.o>