View previous topic :: View next topic |
Author |
Message |
roothorick Tux's lil' helper
Joined: 30 May 2004 Posts: 83
|
Posted: Sat Apr 16, 2005 2:45 am Post subject: cronized emerge -u that won't flood your inbox as much |
|
|
Tried sticking emerge -uD world into a cronjob, then wound up sitting and downloding 20MB worth of automated emails from the damn thing because it decided to mail EVERYTHING emerge generated? I did, and honestly, I didn't like it. So I whipped up this little cron job. As usual, It Works For Me(TM), Use At Your Own Risk(R)
Code: | #!/bin/sh
# System update script. Provides all the juicy info we actually want without
# insanely big logs.
source /etc/make.conf
echo "`hostname --fqdn` system update script starting at `date`"
echo "Packages to merge:"
emerge --changelog --columns --deep --noreplace --nospinner --oneshot \
--pretend --update --verbose world
echo "Attempting merge."
# Here's why we sourced /etc/make.conf. Make things as quiet as possible
# without suppressing messages that I might want to read.
MAKEOPTS="${MAKEOPTS} -s" CFLAGS="${CFLAGS} -w" CXXFLAGS="${CXXFLAGS} -w" \
emerge --deep --nospinner --oneshot --update world
if [ $? -ne 0 ]; then
echo "FAILED! Verbose merge follows."
# Make everything really verbose. There's been a failure; the more
# information the better. (NOTE: Don't override -Werror; if it was
# there before, that might be what caused the merge to fail.
MAKEOPTS="${MAKEOPTS} -w" CFLAGS="${CFLAGS} -Wall -Wextra" \
CXXFLAGS="${CXXFLAGS} -Wall -Wextra" emerge --verbose --resume
return $?
else
echo "Success."
return 0
fi |
I really wish emerge was more friendly for this type of thing... _________________ Note: This user has been arrested under the DMCA for copyright infringement based on a complaint from The Inernational Cliche Company. He is also facing charges for violating US patents describing the encoding of text in digital form. |
|
Back to top |
|
|
inode77 Veteran
Joined: 20 Jan 2004 Posts: 1303 Location: Heart of Europe
|
Posted: Sat Apr 16, 2005 12:38 pm Post subject: |
|
|
Never tried it but could help: Code: | --quiet (-q)
Results may vary, but the general outcome is a reduced or condensed output from portage's displays.
|
|
|
Back to top |
|
|
roothorick Tux's lil' helper
Joined: 30 May 2004 Posts: 83
|
Posted: Sat Apr 16, 2005 2:43 pm Post subject: |
|
|
inode77 wrote: | Never tried it but could help: Code: | --quiet (-q)
Results may vary, but the general outcome is a reduced or condensed output from portage's displays.
|
|
In my personal experience, -q removed exactly the messages I wanted to see (e.g. einfo and ewarn from ebuilds, the stuff you're _supposed_ to read) and not much else. _________________ Note: This user has been arrested under the DMCA for copyright infringement based on a complaint from The Inernational Cliche Company. He is also facing charges for violating US patents describing the encoding of text in digital form. |
|
Back to top |
|
|
|