1 |
On 4/17/06, Alexandre Marcolino <alexandre.marcolino@×××××××.br> wrote: |
2 |
> Ola a todos, |
3 |
> |
4 |
> Cansado de tantas horas de espera para rodar o comando emerge-webrsync |
5 |
> decidi perguntar a lista o que um pobre mortal sem rsync pode fazer para |
6 |
> ter seu portage atualizado. |
7 |
> |
8 |
> Veja, um script que faça o download e aplique já pode ser uma saída, mas |
9 |
> eu nem sei por onde começar. |
10 |
> |
11 |
> Links, dicas e truques mais que bem vindos. |
12 |
|
13 |
Heh, tive o mesmo problema, você pode manualmente atualizar a árvore |
14 |
do portage, assim: |
15 |
|
16 |
wget <ultimo snapshot> |
17 |
tar -xvjf portage-<data>.tar.bz2 -C /usr |
18 |
emerge --regen |
19 |
emerge --metadata |
20 |
|
21 |
Mas eu prefiro o script desse cara "mikenerone" postado nos fóruns: |
22 |
|
23 |
http://forums.gentoo.org/viewtopic-t-325007.html |
24 |
|
25 |
----------------------------------------------------------- |
26 |
#!/bin/bash |
27 |
# shotsync-0.1.2 |
28 |
# Ripped almost line for line from the sync_local() function of |
29 |
emerge-webrsync. |
30 |
# It's purpose is to provide an easy way to sync your Gentoo portage |
31 |
tree to a snapshot file. |
32 |
# Usage example: "shotsync /path/to/portage-20050507.tar.bz2" |
33 |
(relative path is fine, too) |
34 |
# There is no warranty of any kind associated with the use of this script. |
35 |
# Trivially created by Mike Nerone |
36 |
|
37 |
SNAPSHOT="$1" |
38 |
PORTDIR="$(/usr/lib/portage/bin/portageq portdir)" |
39 |
PORTDIR="${PORTDIR%%/}" |
40 |
TMPDIR="$(/usr/lib/portage/bin/portageq envvar PORTAGE_TMPDIR)" |
41 |
TMPDIR="${TMPDIR%%/}/shotsync" |
42 |
|
43 |
if [ -e "$TMPDIR" ]; then |
44 |
echo Cleaning out shotsync\'s tmpdir... |
45 |
rm -rf "$TMPDIR" |
46 |
fi |
47 |
mkdir -p "$TMPDIR" |
48 |
|
49 |
echo Extracting snapshot file "$SNAPSHOT"... |
50 |
if ! tar -C "$TMPDIR" -jxf "$SNAPSHOT"; then |
51 |
echo "Tar failed to extract the image. Please review the output." |
52 |
echo "Executed command: tar -C \"$TMPDIR\" -jxf \"$SNAPSHOT\"" |
53 |
exit 1 |
54 |
fi |
55 |
|
56 |
# Uncomment the next line if you'd like the snapshot file you provided |
57 |
# to be deleted automatically after it is extracted. |
58 |
#rm -f "$SNAPSHOT" |
59 |
|
60 |
# Make sure user and group file ownership is root |
61 |
chown -R 0:0 portage |
62 |
|
63 |
echo Syncing local portage tree to extracted snapshot... |
64 |
rsync -av --progress --stats --delete --delete-after \ |
65 |
--exclude='/distfiles' --exclude='/packages' \ |
66 |
--exclude='/local' "$TMPDIR/portage/" "$PORTDIR" |
67 |
echo "Cleaning up..." |
68 |
rm -rf "$TMPDIR" |
69 |
echo "Updating portage cache..." |
70 |
emerge metadata |
71 |
----------------------------------------------------------- |
72 |
|
73 |
Depois aprendi a setar corretamente as variáveis de ambiente para |
74 |
proxy e não precisei mais me incomodar, o emerge-webrsync começou a |
75 |
funcionar como deveria. |
76 |
|
77 |
-- |
78 |
Daniel da Veiga |
79 |
Computer Operator - RS - Brazil |
80 |
-----BEGIN GEEK CODE BLOCK----- |
81 |
Version: 3.1 |
82 |
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V- |
83 |
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++ |
84 |
------END GEEK CODE BLOCK------ |
85 |
|
86 |
-- |
87 |
gentoo-user-br@g.o mailing list |