1 |
commit: c7202ed23f3680800ca5a8b6841b60b3884032e1 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 1 23:54:07 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 1 23:54:07 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c7202ed2 |
7 |
|
8 |
glsa.py: python3: ResourceWarning: unclosed file |
9 |
|
10 |
--- |
11 |
doc/package/ebuild.docbook | 1 + |
12 |
doc/package/ebuild/eapi/5.docbook | 65 +++++++++++++++++++++++++++++++++++++ |
13 |
doc/portage.docbook | 1 + |
14 |
pym/portage/glsa.py | 3 +- |
15 |
4 files changed, 69 insertions(+), 1 deletions(-) |
16 |
|
17 |
diff --git a/doc/package/ebuild.docbook b/doc/package/ebuild.docbook |
18 |
index ba146ca..e268a3d 100644 |
19 |
--- a/doc/package/ebuild.docbook |
20 |
+++ b/doc/package/ebuild.docbook |
21 |
@@ -11,5 +11,6 @@ |
22 |
&package_ebuild_eapi_4; |
23 |
&package_ebuild_eapi_4_python; |
24 |
&package_ebuild_eapi_4_slot_abi; |
25 |
+&package_ebuild_eapi_5; |
26 |
</section> |
27 |
</chapter> |
28 |
|
29 |
diff --git a/doc/package/ebuild/eapi/5.docbook b/doc/package/ebuild/eapi/5.docbook |
30 |
new file mode 100644 |
31 |
index 0000000..ba1d440 |
32 |
--- /dev/null |
33 |
+++ b/doc/package/ebuild/eapi/5.docbook |
34 |
@@ -0,0 +1,65 @@ |
35 |
+<section id='package-ebuild-eapi-5_pre1'> |
36 |
+<title>EAPI 5_pre1</title> |
37 |
+<section id='package-ebuild-eapi-5_pre1-metadata'> |
38 |
+<title>Metadata</title> |
39 |
+<section id='package-ebuild-eapi-5_pre1-metadata-slot-sub-slot'> |
40 |
+<title>SLOT Supports Optional "sub-slot" part</title> |
41 |
+<para> |
42 |
+The SLOT variable may contain an optional sub-slot part that |
43 |
+follows the regular slot and is delimited by a / character. |
44 |
+The sub-slot must be a valid slot name. The sub-slot is used |
45 |
+to represent cases in which an upgrade to a new version of a |
46 |
+package with a different sub-slot may require dependent |
47 |
+packages to be rebuilt. When the sub-slot part is omitted from |
48 |
+the SLOT definition, the package is considered to have an |
49 |
+implicit sub-slot which is equal to the regular slot. |
50 |
+</para> |
51 |
+<para> |
52 |
+Refer to the |
53 |
+<link linkend="package-ebuild-eapi-5_pre1-metadata-dependency-atom-slot-operators"> |
54 |
+slot operators</link> documentation for more information about sub-slot usage. |
55 |
+</para> |
56 |
+</section> |
57 |
+<section id='package-ebuild-eapi-5_pre1-metadata-dependency-atom-slot-operators'> |
58 |
+<title>Dependency Atom SLOT Operators</title> |
59 |
+<para> |
60 |
+A slot dependency may contain an optional sub-slot part that |
61 |
+follows the regular slot and is delimited by a / character. |
62 |
+An operator slot dependency consists of a colon followed by |
63 |
+one of the following operators: |
64 |
+<itemizedlist> |
65 |
+<listitem><para> |
66 |
+* Indicates that any slot value is acceptable. In addition, |
67 |
+for runtime dependencies, indicates that the package will not |
68 |
+break if the matched package is uninstalled and replaced by |
69 |
+a different matching package in a different slot. |
70 |
+</para></listitem> |
71 |
+<listitem><para> |
72 |
+= Indicates that any slot value is acceptable. In addition, |
73 |
+for runtime dependencies, indicates that the package will |
74 |
+break unless a matching package with slot and sub-slot equal |
75 |
+to the slot and sub-slot of the best installed version at the |
76 |
+time the package was installed is available. |
77 |
+</para></listitem> |
78 |
+<listitem><para> |
79 |
+slot= Indicates that only a specific slot value is acceptable, |
80 |
+and otherwise behaves identically to the plain equals slot |
81 |
+operator. |
82 |
+</para></listitem> |
83 |
+</itemizedlist> |
84 |
+</para> |
85 |
+<para> |
86 |
+To implement the equals slot operator, the package manager |
87 |
+will need to store the slot/sub-slot pair of the best installed |
88 |
+version of the matching package. This syntax is only for package |
89 |
+manager use and must not be used by ebuilds. The package manager |
90 |
+may do this by inserting the appropriate slot/sub-slot pair |
91 |
+between the colon and equals sign when saving the package's |
92 |
+dependencies. The sub-slot part must not be omitted here |
93 |
+(when the SLOT variable omits the sub-slot part, the package |
94 |
+is considered to have an implicit sub-slot which is equal to |
95 |
+the regular slot). |
96 |
+</para> |
97 |
+</section> |
98 |
+</section> |
99 |
+</section> |
100 |
|
101 |
diff --git a/doc/portage.docbook b/doc/portage.docbook |
102 |
index 781915c..f580314 100644 |
103 |
--- a/doc/portage.docbook |
104 |
+++ b/doc/portage.docbook |
105 |
@@ -22,6 +22,7 @@ |
106 |
<!ENTITY package_ebuild_eapi_4 SYSTEM "package/ebuild/eapi/4.docbook"> |
107 |
<!ENTITY package_ebuild_eapi_4_python SYSTEM "package/ebuild/eapi/4-python.docbook"> |
108 |
<!ENTITY package_ebuild_eapi_4_slot_abi SYSTEM "package/ebuild/eapi/4-slot-abi.docbook"> |
109 |
+ <!ENTITY package_ebuild_eapi_5 SYSTEM "package/ebuild/eapi/5.docbook"> |
110 |
<!ENTITY qa SYSTEM "qa.docbook"> |
111 |
<!ENTITY config SYSTEM "config.docbook"> |
112 |
<!ENTITY config_bashrc SYSTEM "config/bashrc.docbook"> |
113 |
|
114 |
diff --git a/pym/portage/glsa.py b/pym/portage/glsa.py |
115 |
index 1857695..f26dc8b 100644 |
116 |
--- a/pym/portage/glsa.py |
117 |
+++ b/pym/portage/glsa.py |
118 |
@@ -473,7 +473,8 @@ class Glsa: |
119 |
myurl = "file://"+self.nr |
120 |
else: |
121 |
myurl = repository + "glsa-%s.xml" % str(self.nr) |
122 |
- self.parse(urllib_request_urlopen(myurl)) |
123 |
+ with urllib_request_urlopen(myurl) as f: |
124 |
+ self.parse(f) |
125 |
return None |
126 |
|
127 |
def parse(self, myfile): |