Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cronized emerge -u that won't flood your inbox as much
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
roothorick
Tux's lil' helper
Tux's lil' helper


Joined: 30 May 2004
Posts: 83

PostPosted: Sat Apr 16, 2005 2:45 am    Post subject: cronized emerge -u that won't flood your inbox as much Reply with quote

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
View user's profile Send private message
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Sat Apr 16, 2005 12:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
roothorick
Tux's lil' helper
Tux's lil' helper


Joined: 30 May 2004
Posts: 83

PostPosted: Sat Apr 16, 2005 2:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum