public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Thanasis <thanasis@asyr.hopto.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Howzat!
Date: Thu, 21 Apr 2011 10:44:27 +0300	[thread overview]
Message-ID: <4DAFE05B.6020804@asyr.hopto.org> (raw)
In-Reply-To: <20110420230139.49fef528@digimed.co.uk>

on 04/21/2011 01:01 AM Neil Bothwick wrote the following:
> On Thu, 21 Apr 2011 00:23:01 +0300, Thanasis wrote:
>
>> Thanks! Can you add some comments, like what the directories presync.d
>> and postupdate.d are supposed to be ... as I don't have those.
>>
>> I have postsync.d and don't know what is it about ... It contains a file
>> named q-reinitialize :
>
> Scripts/programs in postsync.d are executed by portage after a sync. The
> other two are ones I added, before portage had postsync support, to run
> anything I wanted before and after a sync. The only thing  used them for
> now is to turn rsyncd off and on on my server, to prevent other machines
> syncing from it while its portage tree is being updated.
>
> BTW - I read the list, no need to send me an extra copy of the mail
> directly.
So, I understand that normally (in my case) there is no need for these
presync.d and postupdate.d directories, right?
The script could be stripped from these like so:
###########################################################################

#!/bin/bash

export PORTAGE_ECLASS_WARNING_ENABLE="0"
WORLD_MERGE="emerge --update --deep --reinstall changed-use --with-bdeps
y --verbose @system @world"

SYNCED=""
for i in {0..12}; do
    echo "$(date): syncing portage"
    emerge --sync && SYNCED="true" && break
    sleep 5m
done

if [[ "${SYNCED}" ]]; then
    if [[ "${SYNCED}" == "true" ]]; then
        echo "Portage synced" 1>&2
    else
        echo "Portage not synced" 1>&2
    fi
    TEMPFILE=$(mktemp)
    ${WORLD_MERGE} --changelog --pretend >|${TEMPFILE}
    Mail -s "$(hostname): Updated packages" neil <${TEMPFILE}
    rm -f ${TEMPFILE}
else
    echo "Failure syncing portage" >&2
fi

GLSAs=$(glsa-check --test all 2>/dev/null)
if [[ -n "${GLSAs}" ]]; then
    for GLSA in ${GLSAs}; do
        glsa-check --dump ${GLSA} | grep -B88 Unaffected
        echo -e "\n"
    done | Mail -s "GLSA warnings for $(hostname)" neil
fi

if [[ -x "$(which eix-update 2>/dev/null)" ]]; then
    eix-update --quiet
    [[ -f /etc/portage/no-eix-remote ]] ||
LOCAL_LAYMAN=/mnt/portage/layman eix-remote -q update
fi

exit 0
###########################################################################

Is that correct?




  reply	other threads:[~2011-04-21  7:46 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18  1:28 [gentoo-user] Howzat! Peter Humphrey
2011-04-18  1:44 ` Dale
2011-04-18  4:53   ` Joshua Murphy
2011-04-18  7:52     ` Florian Philipp
2011-04-18  8:12       ` Neil Bothwick
2011-04-18  9:32         ` Florian Philipp
2011-04-19 22:40     ` Kfir Lavi
2011-04-19 22:54       ` Dale
2011-04-20  7:33         ` Joost Roeleveld
2011-04-20  8:42           ` Dale
2011-04-20  9:25             ` Joost Roeleveld
2011-04-20  9:49               ` Pandu Poluan
2011-04-20 10:24                 ` Joost Roeleveld
2011-04-21  5:41                   ` Pandu Poluan
2011-04-21 15:49                     ` Paul Hartman
2011-04-20 12:37               ` Joost Roeleveld
2011-04-20 13:16                 ` Alan McKinnon
2011-04-20 13:41                   ` Joost Roeleveld
2011-04-20 20:06                     ` Alan McKinnon
2011-04-20 21:38                       ` Mick
2011-04-18 11:22   ` Peter Humphrey
2011-04-18 12:44     ` Neil Bothwick
2011-04-18 14:35       ` Peter Humphrey
2011-04-18 14:51         ` Florian Philipp
2011-04-18 15:48           ` Peter Humphrey
2011-04-18 15:59             ` Peter Humphrey
2011-04-18 21:56           ` Neil Bothwick
2011-04-19  5:34             ` Thanasis
2011-04-19  6:57               ` Joost Roeleveld
2011-04-19  8:04                 ` Neil Bothwick
2011-04-19 12:07                   ` Thanasis
2011-04-20 13:33                     ` Neil Bothwick
2011-04-20 21:23                       ` Thanasis
2011-04-20 22:01                         ` Neil Bothwick
2011-04-21  7:44                           ` Thanasis [this message]
2011-04-21  8:03                             ` Neil Bothwick
2011-04-21  8:15                               ` Thanasis
2011-04-21 10:57                               ` Thanasis
2011-04-21 13:26                                 ` Neil Bothwick
2011-04-21 14:45                                   ` Thanasis
2011-04-21 22:09                                     ` Neil Bothwick
2011-04-22  5:05                                       ` Thanasis
2011-04-22  7:14                                         ` Neil Bothwick
2011-04-22  8:12                                           ` Thanasis
2011-04-22 13:00                                             ` Neil Bothwick
2011-04-22 15:26                                               ` Thanasis
2011-04-22 18:46                                                 ` Neil Bothwick
2011-04-21 13:41                       ` Mark Knecht
2011-04-21 22:42                         ` Neil Bothwick
2011-04-22  0:38                           ` Mark Knecht
2011-04-19 12:40                   ` Joost Roeleveld
2011-04-20 10:40                     ` Thanasis

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=4DAFE05B.6020804@asyr.hopto.org \
    --to=thanasis@asyr.hopto.org \
    --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