Am Wed, 21 May 2014 23:11:02 -0400
schrieb Rich Freeman <ri...@gentoo.org>:

> On Wed, May 21, 2014 at 10:10 PM,  <ny6...@gmail.com> wrote:
> > I run a script that syncs portage, updates @world, depcleans, revdep-rebuild
> > and finally runs dispatch-conf -- about once weekly. Keeps my system in fine
> > trim. :)
> 
> This one is a gem - I forget where I saw it (likely planet, but maybe
> it was on a list).  Stick it in your crontab.  I will warn you that
> sometimes it chokes on its own output and obviously it can't build
> binpkgs for anything more than one step down the dependency tree.
> However, when my weekly chromium build runs at 2AM and I can just
> install it (with -k) the next morning it is a nice thing indeed.  You
> still get full control over USE flags/etc, but most of the convenience
> of a binary distro.
> 
> #!/bin/sh
> 
> LIST=$(mktemp);
> 
> emerge -puD --changed-use --color=n --columns --quiet=y --with-bdeps=y
> world | awk '{print $2}' > ${LIST};
> 
> for PACKAGE in $(cat ${LIST});
> do
>   printf "Building binary package for ${PACKAGE}... "
>   emerge -uN --quiet-build --quiet=y --buildpkgonly ${PACKAGE};
>   if [[ $? -eq 0 ]];
>   then
>     echo "ok";
>   else
>     echo "failed";
>   fi
> done

I think nowadays one would prefer --keep-going, which automatically resumes on
failure (and recomputes the dependency tree!), and prints a list of failed
packages when it's finished. However its output is more verbose than just "ok"
and "failed" (it'll print the build.log if it's only one package, IIRC).

-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

Attachment: signature.asc
Description: PGP signature

Reply via email to