1 |
Author: zmedico |
2 |
Date: 2008-04-11 18:48:33 +0000 (Fri, 11 Apr 2008) |
3 |
New Revision: 9833 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/pym/portage.py |
7 |
Log: |
8 |
In config.setcpv() and load_infodir(), always set known good values |
9 |
for CATEGORY and PF, since corruption of these can cause problems. |
10 |
(trunk r9832) |
11 |
|
12 |
|
13 |
Modified: main/branches/2.1.2/pym/portage.py |
14 |
=================================================================== |
15 |
--- main/branches/2.1.2/pym/portage.py 2008-04-11 18:46:50 UTC (rev 9832) |
16 |
+++ main/branches/2.1.2/pym/portage.py 2008-04-11 18:48:33 UTC (rev 9833) |
17 |
@@ -1879,6 +1879,13 @@ |
18 |
os.path.join(infodir, "CATEGORY"), noiselevel=-1) |
19 |
self.configdict["pkg"].update(backup_pkg_metadata) |
20 |
retval = 0 |
21 |
+ |
22 |
+ # Always set known good values for these variables, since |
23 |
+ # corruption of these can cause problems: |
24 |
+ cat, pf = catsplit(self.mycpv) |
25 |
+ self.configdict["pkg"]["CATEGORY"] = cat |
26 |
+ self.configdict["pkg"]["PF"] = pf |
27 |
+ |
28 |
return retval |
29 |
|
30 |
def setcpv(self, mycpv, use_cache=1, mydb=None): |
31 |
@@ -2016,8 +2023,13 @@ |
32 |
# Without this conditional, regenerate() would be called |
33 |
# *every* time. |
34 |
has_changed = True |
35 |
- # CATEGORY is essential for doebuild calls |
36 |
- self.configdict["pkg"]["CATEGORY"] = mycpv.split("/")[0] |
37 |
+ |
38 |
+ # Always set known good values for these variables, since |
39 |
+ # corruption of these can cause problems: |
40 |
+ cat, pf = catsplit(self.mycpv) |
41 |
+ self.configdict["pkg"]["CATEGORY"] = cat |
42 |
+ self.configdict["pkg"]["PF"] = pf |
43 |
+ |
44 |
if has_changed: |
45 |
self.reset(keeping_pkg=1,use_cache=use_cache) |
46 |
|
47 |
|
48 |
-- |
49 |
gentoo-commits@l.g.o mailing list |