1 |
15. èen (Ètvrtek) v 10:42:21 CEST 2006, Honza Macháèek <Hloupy.Honza@×××××××.cz> napsal(a): |
2 |
> > A kdyz chci emergnout nejaky balik, tak to zkonci podobne |
3 |
> > |
4 |
> > holly maaca # emerge -pv links |
5 |
> > Traceback (most recent call last): |
6 |
> > File "/usr/bin/emerge", line 10, in ? |
7 |
> > import portage |
8 |
> > File "/usr/lib/portage/pym/portage.py", line 7187, in ? |
9 |
> > settings=config(config_profile_path=PROFILE_PATH,config_incrementals=portage_const.INCREMENTALS) |
10 |
> > File "/usr/lib/portage/pym/portage.py", line 946, in __init__ |
11 |
> > mypath = os.path.normpath(mypath+"///"+grabfile(mypath+"/parent")[0]) |
12 |
> > IndexError: list index out of range |
13 |
> |
14 |
> Kus kódu na øádku 946 je u mì: |
15 |
> |
16 |
> > self.configdict = { "globals": self.configlist[0], |
17 |
> > "defaults": self.configlist[1], |
18 |
> > "conf": self.configlist[2], |
19 |
> > "pkg": self.configlist[3], |
20 |
> > "auto": self.configlist[4], |
21 |
> > "backupenv": self.configlist[5], |
22 |
> > "env": self.configlist[6] } |
23 |
> |
24 |
> Jak u Vás? |
25 |
Ja tam mam tohle |
26 |
|
27 |
# The symlink might not exist or might not be a symlink. |
28 |
try: |
29 |
self.profiles=[abssymlink(self.profile_path)] |
30 |
except SystemExit, e: |
31 |
raise |
32 |
except: |
33 |
self.profiles=[self.profile_path] |
34 |
|
35 |
mypath = self.profiles[0] |
36 |
while os.path.exists(mypath+"/parent"): |
37 |
mypath = os.path.normpath(mypath+"///"+grabfile(mypath+"/parent")[0]) |
38 |
if os.path.exists(mypath): |
39 |
self.profiles.insert(0,mypath) |
40 |
|
41 |
if os.environ.has_key("PORTAGE_CALLER") and os.environ["PORTAGE_CALLER"] == "repoman": |
42 |
pass |
43 |
else: |
44 |
# XXX: This should depend on ROOT? |
45 |
if os.path.exists("/"+CUSTOM_PROFILE_PATH): |
46 |
self.user_profile_dir = os.path.normpath("/"+"///"+CUSTOM_PROFILE_PATH) |
47 |
self.profiles.append(self.user_profile_dir[:]) |
48 |
|
49 |
Ale nejsem si uplne jistej, co ta cast kodu vlastne dela |
50 |
|
51 |
> Øádek 7187 já v portage.py vùbec nemám (portage-2.1_rc4-r3, |
52 |
> aktuální verze ~x86). |
53 |
Ja tu mam portage-2.0.54-r2 (aktuální na amd64) |
54 |
|
55 |
Radek 7187: |
56 |
|
57 |
# ----------------------------------------------------------------------------- |
58 |
# We're going to lock the global config to prevent changes, but we need |
59 |
# to ensure the global settings are right. |
60 |
settings=config(config_profile_path=PROFILE_PATH,config_incrementals=portage_const.INCREMENTALS) |
61 |
|
62 |
Tady by mohl byt zakopany pes, ale netusim, jaky konfiguraky kontroluje. |
63 |
|
64 |
> Mù¾u poslat tgz archiv vytvoøený emerge -B portage |
65 |
> (330 kB, mohlo by jej staèit rozbalit tarem, a pak hned emerge portage). |
66 |
Dekuji za nabidku, ale nejsem si uplne jistej, co by v tudle chvili |
67 |
udelal prechod z portage 2.0 na 2.1. To bych asi nechal jako posledni |
68 |
moznost. |
69 |
|
70 |
> Jestli nepomáhá ani úplná ruèní obnova portage, doporuèuji jít ruènì |
71 |
> do modulù, které hlásí chyby, a doplòovat do nich výpisy v¹eho mo¾ného, |
72 |
> dokud neprozradí, co ¾e se to sna¾í dìlat, odkud a jaká data pro to |
73 |
> berou a co se jim na nich nelíbí. |
74 |
Tim asi zacnu. |
75 |
|
76 |
> Jak tak koukám do své verze portage, myslím, ¾e relevantní èást jejího |
77 |
> kódu bude: |
78 |
> |
79 |
> > # The symlink might not exist or might not be a symlink. |
80 |
> > if self.profile_path is None: |
81 |
> > self.profiles = [] |
82 |
> > else: |
83 |
> > self.profiles = [os.path.realpath(self.profile_path)] |
84 |
> > mypath = self.profiles[0] |
85 |
> > while os.path.exists(os.path.join(mypath, "parent")): |
86 |
> > parents_file = os.path.join(mypath, "parent") |
87 |
> > parents = grabfile(parents_file) |
88 |
> > if len(parents) != 1: |
89 |
> > raise portage_exception.ParseError( |
90 |
> > "Expected 1 parent and got %i: '%s'" % \ |
91 |
> > (len(parents), parents_file)) |
92 |
> > mypath = os.path.normpath(os.path.join( |
93 |
> > mypath, parents[0])) |
94 |
> > if os.path.exists(mypath): |
95 |
> > self.profiles.insert(0, mypath) |
96 |
> > else: |
97 |
> > raise portage_exception.ParseError( |
98 |
> > "Specified parent not found: '%s'" % parents_file) |
99 |
> |
100 |
> Zdá se, ¾e je tu cosi o¹etøeno peèlivìji ne¾ ve Va¹í verzi -- a to |
101 |
> cosi je zøejmì tím, co máte ¹patnì. Jak jste na tom s linkem |
102 |
> /etc/make.profile? U mì: |
103 |
> |
104 |
> > ls -ld /etc/make.profile |
105 |
> > lrwxrwxrwx 1 root root 48 2006-04-26 11:42 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2006.0 |
106 |
|
107 |
holly maaca # ls -ld /etc/make.profile |
108 |
lrwxrwxrwx 1 root root 48 2005-09-19 11:38 /etc/make.profile -> /usr/portage/profiles/default-linux/amd64/2005.0 |
109 |
|
110 |
> Mo¾ná bych jako první ladicí výpis zkusil pøidat pøed øádek 946 v |
111 |
> portage.py nìco jako print mypath. |
112 |
|
113 |
Dekuji za rady. Zkusim zjistit, co vlastne dela. Snad z nej neco vyleze. |
114 |
|
115 |
-- |
116 |
Martin \ \/ / /\/\ / ' /\ // |
117 |
// \_\ /_/ /\ \_\__/ \ Rehula |
118 |
-- |
119 |
gentoo-user-cs@g.o mailing list |