]>
Raphaƫl G. Git Repositories - distcook/blob - lib/setup.sh
4 if [ -f "$PWD/root/var/cache/urpmi/mirrors.cache" ]; then
5 rm -f "$PWD/root/var/cache/urpmi/mirrors.cache"
7 if [ -f "$PWD/root/var/cache/urpmi/.metalink" ]; then
8 rm -f "$PWD/root/var/cache/urpmi/.metalink"
12 #XXX: umount many time just in case
13 umount
"$PWD/root/proc" "$PWD/root/sys" || true
14 mount
--bind /proc
"$PWD/root/proc"
15 mount
--bind /sys
"$PWD/root/sys"
18 cat << EOF > "$PWD/root/etc/sysconfig/clock"
24 #Fix timezone for urpmi
25 if [ -f "$PWD/root/usr/share/zoneinfo/$ZONE" ]; then
26 ln -fs "../usr/share/zoneinfo/$ZONE" "$PWD/root/etc/localtime"
30 LC_ALL
=C chroot
"$PWD/root" urpmi.removemedia
-a
32 LC_ALL
=C chroot
"$PWD/root" urpmi.addmedia
--distrib --mirrorlist http
://mirrors.mageia.org
/api
/mageia.
$MGARELEASE.
$ARCH.list
34 umount
"$PWD/root/proc" "$PWD/root/sys"
36 #perl -pne 's%(.*testing.*) {\n%\1 {\n ignore\n%i' -i "$PWD/root/etc/urpmi/urpmi.cfg"
37 #perl -pne 'undef $/; s% +{(?:\n +.(?:country|proximity|longitude|arch|version|zone|latitude).[^,]+,){7}\n +.url.[^,]+distrib-coffee[^,]+,(?:\n +.(?:type|proximity_corrected).[^,]+,){2}\n%%' -i "$PWD/root/var/cache/urpmi/mirrors.cache"