From: Glenn Enright <elinar@ihug.co.nz>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Update portage cache ... horribly slow
Date: Thu, 29 Sep 2005 04:58:12 +0000 [thread overview]
Message-ID: <200509290458.12561.elinar@ihug.co.nz> (raw)
In-Reply-To: <433A88A8.4060309@quanteam.info>
On Wed, 28 Sep 2005 12:12, Paweł Madej wrote:
> Dunc wrote:
> > For something you should only do once a day, 10 minutes isn't that bad
> > though.
>
> I sync not day by day but 2-3 times a week but when I sync I want to run
> just after it emerge of updates (I follow new ebuilds on [1] site and
> run emerge if sth interesting for me appears there).
>
> My other question is if there is some script which could follow rrs from
> [1] and run emerge sync and emerge -uND world after there is for example
> 10 ebuild updated comparing to my system, or other way that it will
> email me that there is 10 ebuilds new and i should run sync manually.
>
> Greets
> Paweł
I second esync. It is a nice script that runs a little faster than 'emerge
sync'. I have a little script in my daily cron list that follows...
#! /bin/sh
# /etc/cron.daily/esync.automated
# ============================================================================
# Based on rkhunter script by Aaron Walker <ka0ttic@gentoo.org>
# Written by Glenn Enright on 14-Oct-2004
#
# Purpose
# To provide a facility to regularly update the portage tree via cron so we
# don't have to remember to do it manually, and send us a list of updates to
# consider.
#
# Requires
# portage to be properly installed. see 'man emerge' for details
# esearch: do 'emerge esearch'
#
# CHANGELOG:
# 19-Oct-2004 - updated to use tool esearch. Improved speed and
# feedback.
# 29-Sep-2005 - Reviewed code and did some tidying up. Changed file
# group to wheel to allow easier administration.
#
# ----------------------------------------------------------------------------
# ENABLEMENT OPTIONS
# set to no if you don't want to run this script
#
ENABLE=yes
# set to 'yes' if you wish the output to be mailed to you
#
SEND_EMAIL=yes
# ----------------------------------------------------------------------------
# OPERATIONAL COMMANDS
# main command
# fixme: is nice needed with 2.6 kernel?
CMD="nice esync --nocolor --nospinner"
# NOTE: the rest of these options are only relevant
# if you set SEND_EMAIL to 'yes'
#
EMAIL_SUBJECT="${HOSTNAME}: 'esync' output"
EMAIL_RECIPIENT=root
EMAIL_CMD="| mail -s \"${EMAIL_SUBJECT}\" ${EMAIL_RECIPIENT}"
# ============================================================================
if [ "${ENABLE}" = "yes" ]; then
if [ -x /usr/bin/emerge ]; then
#-------------------------------------------------------
# test to see if we want to send success/failure email
#
if [ "${SEND_EMAIL}" = "yes" ]; then
CMD="${CMD} ${EMAIL_CMD}"
else
CMD="${CMD} &>/dev/null"
fi
# ------------------------------------------------------
# ------------------------------------------------------
# check to see if emerge is already running so
# we dont interupt it. fail gracefully if it is
#
if [ ! "ps -ax | grep -c emerge" ]; then
# NB: the following text is formated from the margin.
MAIL_WARN_MESSAGE="echo -e ' ** WARNING ** : The program 'emerge' is
currently running. Please wait for the next scheduled update or run esync
manually.'"
eval exec "${MAIL_WARN_MESSAGE} ${EMAIL_CMD}"
else
# actually do the thing
eval exec "${CMD}"
fi
# -----------------------------------------------------
fi
fi
# EOF
--
The programmers of old were mysterious and profound. We cannot fathom
their thoughts, so all we do is describe their appearance.
Aware, like a fox crossing the water. Alert, like a general on the
battlefield. Kind, like a hostess greeting her guests. Simple, like uncarved
blocks of wood. Opaque, like black pools in darkened caves.
Who can tell the secrets of their hearts and minds?
The answer exists only in the Tao.
-- Geoffrey James, "The Tao of Programming"
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2005-09-29 5:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-28 11:04 [gentoo-user] Update portage cache ... horribly slow Paweł Madej
2005-09-28 11:20 ` Allan Spagnol Comar
2005-09-28 11:24 ` Paweł Madej
2005-09-28 11:43 ` Dunc
2005-09-28 12:12 ` Paweł Madej
2005-09-28 12:21 ` Paweł Madej
2005-09-28 13:04 ` Holly Bostick
2005-09-28 13:24 ` Michael Crute
2005-09-28 13:39 ` Neil Bothwick
2005-09-29 4:58 ` Glenn Enright [this message]
2005-09-29 8:22 ` Neil Bothwick
2005-09-29 10:02 ` Glenn Enright
2005-09-28 11:52 ` Michael Kintzios
2005-09-28 13:33 ` Dave Nebinger
2005-09-28 14:29 ` Paweł Madej
2005-09-28 15:10 ` Holly Bostick
2005-09-28 15:19 ` Hemmann, Volker Armin
2005-09-28 15:24 ` Dave Nebinger
2005-09-28 15:27 ` Tony Davison
2005-09-28 15:43 ` Holly Bostick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200509290458.12561.elinar@ihug.co.nz \
--to=elinar@ihug.co.nz \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox