gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] accessing mirrors


From: Dustin Sallings
Subject: Re: [Gnu-arch-users] accessing mirrors
Date: Mon, 12 Jan 2004 21:35:18 -0800


On Jan 12, 2004, at 18:22, Colin Walters wrote:

I learned this lesson in a different context today too. As far as I can tell, you should *never* do a 'get' from a -SOURCE archive. The need to
do so means your setup is broken.

I use the following script to manage that for me (it's kind of long for what it does, but I like it):

#!/bin/sh
#
# Swap a replicatable archive between read-only and read-write mode.

archive="address@hidden"
if [ $# -gt 0 ]
then
        archive="$1"
fi

archive_m="${archive}-MIRROR"
archive_s="${archive}-SOURCE"

m=`tla whereis-archive $archive_m`
s=`tla whereis-archive $archive_s`
b=`tla whereis-archive $archive`

# echo "$archive_m = $m"
# echo "$archive_s = $s"
# echo "$archive = $b"

if [ "$m" = "" ]
then
        # There is not a MIRROR entry
        if [ "$s" = "" ]
        then
                echo "No mirror registered for this archive."
        else
                # There is a SOURCE entry
                tla register-archive -f $archive "$s"
                tla register-archive -f $archive_m "$b"
                tla register-archive -d $archive_s
                echo "$archive is now remote (rw)"
        fi
else
        # There is a MIRROR entry
        tla register-archive -f $archive "$m"
        tla register-archive -f $archive_s "$b"
        tla register-archive -d $archive_m
        echo "$archive is now in local (ro)"
fi


--
SPY                      My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <address@hidden>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________





reply via email to

[Prev in Thread] Current Thread [Next in Thread]