Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13693 - main/trunk/pym/_emerge
Date: Thu, 25 Jun 2009 06:35:29
Message-Id: E1MJiYQ-0007n1-9c@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-06-25 06:35:25 +0000 (Thu, 25 Jun 2009)
3 New Revision: 13693
4
5 Modified:
6 main/trunk/pym/_emerge/EbuildFetchonly.py
7 main/trunk/pym/_emerge/Package.py
8 main/trunk/pym/_emerge/depgraph.py
9 Log:
10 Add a Package.metadata.restrict attribute containing a list of enabled
11 RESTRICT values.
12
13
14 Modified: main/trunk/pym/_emerge/EbuildFetchonly.py
15 ===================================================================
16 --- main/trunk/pym/_emerge/EbuildFetchonly.py 2009-06-25 06:24:33 UTC (rev 13692)
17 +++ main/trunk/pym/_emerge/EbuildFetchonly.py 2009-06-25 06:35:25 UTC (rev 13693)
18 @@ -24,9 +24,8 @@
19 ebuild_path = portdb.findname(pkg.cpv)
20 settings.setcpv(pkg)
21 debug = settings.get("PORTAGE_DEBUG") == "1"
22 - restrict_fetch = 'fetch' in settings['PORTAGE_RESTRICT'].split()
23
24 - if restrict_fetch:
25 + if 'fetch' in pkg.metadata.restrict:
26 rval = self._execute_with_builddir()
27 else:
28 rval = portage.doebuild(ebuild_path, "fetch",
29
30 Modified: main/trunk/pym/_emerge/Package.py
31 ===================================================================
32 --- main/trunk/pym/_emerge/Package.py 2009-06-25 06:24:33 UTC (rev 13692)
33 +++ main/trunk/pym/_emerge/Package.py 2009-06-25 06:35:25 UTC (rev 13693)
34 @@ -241,3 +241,7 @@
35 @property
36 def properties(self):
37 return self['PROPERTIES'].split()
38 +
39 + @property
40 + def restrict(self):
41 + return self['RESTRICT'].split()
42
43 Modified: main/trunk/pym/_emerge/depgraph.py
44 ===================================================================
45 --- main/trunk/pym/_emerge/depgraph.py 2009-06-25 06:24:33 UTC (rev 13692)
46 +++ main/trunk/pym/_emerge/depgraph.py 2009-06-25 06:35:25 UTC (rev 13693)
47 @@ -3709,18 +3709,8 @@
48 else:
49 repo_path_real = portdb.getRepositoryPath(repo_name)
50 pkg_use = list(pkg.use.enabled)
51 - try:
52 - restrict = flatten(use_reduce(paren_reduce(
53 - pkg.metadata["RESTRICT"]), uselist=pkg_use))
54 - except portage.exception.InvalidDependString, e:
55 - if not pkg.installed:
56 - show_invalid_depstring_notice(x,
57 - pkg.metadata["RESTRICT"], str(e))
58 - del e
59 - return 1
60 - restrict = []
61 - if "ebuild" == pkg_type and x[3] != "nomerge" and \
62 - "fetch" in restrict:
63 + if not pkg.built and pkg.operation == 'merge' and \
64 + 'fetch' in pkg.metadata.restrict:
65 fetch = red("F")
66 if ordered:
67 counters.restrict_fetch += 1