Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r15219 - in main/branches/prefix/pym: portage repoman
Date: Fri, 29 Jan 2010 18:02:13
Message-Id: E1NavAS-0001rM-Ri@stork.gentoo.org
1 Author: grobian
2 Date: 2010-01-29 18:02:04 +0000 (Fri, 29 Jan 2010)
3 New Revision: 15219
4
5 Modified:
6 main/branches/prefix/pym/portage/__init__.py
7 main/branches/prefix/pym/repoman/utilities.py
8 Log:
9 Merged from trunk -r15214:15218
10
11 | 15216 | Move the DOM unlink call to a finally block. |
12 | zmedico | |
13
14 | 15217 | Bug #300378 - Don't export FILESDIR to the 'depend' phase. |
15 | zmedico | |
16
17 | 15218 | In portage.spawn(), apply group write permission to the log |
18 | zmedico | file. |
19
20
21 Modified: main/branches/prefix/pym/portage/__init__.py
22 ===================================================================
23 --- main/branches/prefix/pym/portage/__init__.py 2010-01-29 17:53:39 UTC (rev 15218)
24 +++ main/branches/prefix/pym/portage/__init__.py 2010-01-29 18:02:04 UTC (rev 15219)
25 @@ -3797,6 +3797,9 @@
26 if eapi not in ("0", "1", "2", "3", "3_pre2"):
27 mydict.pop("AA", None)
28
29 + if phase == 'depend':
30 + mydict.pop('FILESDIR', None)
31 +
32 return mydict
33
34 def thirdpartymirrors(self):
35 @@ -4171,6 +4174,8 @@
36
37 if logfile:
38 log_file = open(_unicode_encode(logfile), mode='ab')
39 + apply_secpass_permissions(logfile,
40 + uid=portage_uid, gid=portage_gid, mode=0o664)
41 stdout_file = os.fdopen(os.dup(fd_pipes_orig[1]), 'wb')
42 master_file = os.fdopen(master_fd, 'rb')
43 iwtd = [master_file]
44
45 Modified: main/branches/prefix/pym/repoman/utilities.py
46 ===================================================================
47 --- main/branches/prefix/pym/repoman/utilities.py 2010-01-29 17:53:39 UTC (rev 15218)
48 +++ main/branches/prefix/pym/repoman/utilities.py 2010-01-29 18:02:04 UTC (rev 15219)
49 @@ -124,28 +124,30 @@
50 raise exception.ParseError("metadata.xml: %s" % (e,))
51
52 try:
53 - usetag = metadatadom.getElementsByTagName("use")
54 - if not usetag:
55 +
56 + try:
57 + usetag = metadatadom.getElementsByTagName("use")
58 + if not usetag:
59 + return uselist
60 + except NotFoundErr:
61 return uselist
62 - except NotFoundErr:
63 - return uselist
64
65 - try:
66 - flags = usetag[0].getElementsByTagName("flag")
67 - except NotFoundErr:
68 - raise exception.ParseError("metadata.xml: " + \
69 - "Malformed input: missing 'flag' tag(s)")
70 -
71 - for flag in flags:
72 - pkg_flag = flag.getAttribute("name")
73 - if not pkg_flag:
74 + try:
75 + flags = usetag[0].getElementsByTagName("flag")
76 + except NotFoundErr:
77 raise exception.ParseError("metadata.xml: " + \
78 - "Malformed input: missing 'name' attribute for 'flag' tag")
79 - uselist.append(pkg_flag)
80 + "Malformed input: missing 'flag' tag(s)")
81
82 - metadatadom.unlink()
83 - return uselist
84 + for flag in flags:
85 + pkg_flag = flag.getAttribute("name")
86 + if not pkg_flag:
87 + raise exception.ParseError("metadata.xml: " + \
88 + "Malformed input: missing 'name' attribute for 'flag' tag")
89 + uselist.append(pkg_flag)
90 + return uselist
91
92 + finally:
93 + metadatadom.unlink()
94
95 def FindPackagesToScan(settings, startdir, reposplit):
96 """ Try to find packages that need to be scanned