Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11782 - main/trunk/pym/portage
Date: Sat, 01 Nov 2008 08:32:59
Message-Id: E1KwBuk-0004Yy-0v@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-11-01 08:32:57 +0000 (Sat, 01 Nov 2008)
3 New Revision: 11782
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 * In fetch(), ensure that pkg_nofetch is never called more than once.
9 * In _validate_deps(), revert back to using aux_get since the config
10 instance does not cache SRC_URI.
11
12
13 Modified: main/trunk/pym/portage/__init__.py
14 ===================================================================
15 --- main/trunk/pym/portage/__init__.py 2008-11-01 07:22:49 UTC (rev 11781)
16 +++ main/trunk/pym/portage/__init__.py 2008-11-01 08:32:57 UTC (rev 11782)
17 @@ -3657,6 +3657,7 @@
18
19 distdir_writable = can_fetch and not fetch_to_ro
20 failed_files = set()
21 + restrict_fetch_msg = False
22
23 for myfile in filedict:
24 """
25 @@ -4099,7 +4100,8 @@
26 if listonly:
27 writemsg_stdout("\n", noiselevel=-1)
28 if fetched != 2:
29 - if restrict_fetch:
30 + if restrict_fetch and not restrict_fetch_msg:
31 + restrict_fetch_msg = True
32 msg = ("\n!!! %s/%s" + \
33 " has fetch restriction turned on.\n" + \
34 "!!! This probably means that this " + \
35 @@ -4135,17 +4137,21 @@
36 mysettings.pop("EBUILD_PHASE", None)
37 else:
38 mysettings["EBUILD_PHASE"] = ebuild_phase
39 - if listonly:
40 - continue
41 +
42 + elif restrict_fetch:
43 + pass
44 elif listonly:
45 - continue
46 + pass
47 elif not filedict[myfile]:
48 writemsg("Warning: No mirrors available for file" + \
49 " '%s'\n" % (myfile), noiselevel=-1)
50 else:
51 writemsg("!!! Couldn't download '%s'. Aborting.\n" % myfile,
52 noiselevel=-1)
53 - if fetchonly and not restrict_fetch:
54 +
55 + if listonly:
56 + continue
57 + elif fetchonly:
58 failed_files.add(myfile)
59 continue
60 return 0
61 @@ -5847,7 +5853,8 @@
62 misc_keys = ["LICENSE", "PROPERTIES", "PROVIDE", "RESTRICT", "SRC_URI"]
63 other_keys = ["SLOT"]
64 all_keys = dep_keys + misc_keys + other_keys
65 - metadata = mysettings.configdict["pkg"]
66 + metadata = dict(izip(all_keys,
67 + mydbapi.aux_get(mysettings.mycpv, all_keys)))
68
69 class FakeTree(object):
70 def __init__(self, mydb):