1 |
From 841660a8064012b734b5c62e1c1e3e1132403d5c Mon Sep 17 00:00:00 2001 |
2 |
From: Brian Dolbec <dolsen@g.o> |
3 |
Date: Sat, 3 Oct 2015 08:57:55 -0700 |
4 |
Subject: [PATCH] repoman: Add file encoding sheband for py-2.7 compatibility |
5 |
(bug 562108) |
6 |
|
7 |
This makes python treat all string declarations as unicode strings. |
8 |
This prevents errors like getting an unicode string via the command line and it being |
9 |
added to an ascii string. |
10 |
|
11 |
X-Gentoo-bug: 562108 |
12 |
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=562108 |
13 |
--- |
14 |
pym/repoman/_subprocess.py | 1 + |
15 |
pym/repoman/_xml.py | 1 + |
16 |
pym/repoman/actions.py | 1 + |
17 |
pym/repoman/argparser.py | 1 + |
18 |
pym/repoman/check_missingslot.py | 1 + |
19 |
pym/repoman/checks/directories/files.py | 1 + |
20 |
pym/repoman/checks/ebuilds/checks.py | 1 + |
21 |
pym/repoman/checks/ebuilds/errors.py | 1 + |
22 |
pym/repoman/checks/ebuilds/fetches.py | 1 + |
23 |
pym/repoman/checks/ebuilds/isebuild.py | 1 + |
24 |
pym/repoman/checks/ebuilds/keywords.py | 1 + |
25 |
pym/repoman/checks/ebuilds/manifests.py | 1 + |
26 |
pym/repoman/checks/ebuilds/misc.py | 1 + |
27 |
pym/repoman/checks/ebuilds/pkgmetadata.py | 1 + |
28 |
pym/repoman/checks/ebuilds/thirdpartymirrors.py | 1 + |
29 |
pym/repoman/checks/ebuilds/use_flags.py | 1 + |
30 |
pym/repoman/checks/herds/metadata.py | 1 + |
31 |
pym/repoman/copyrights.py | 1 + |
32 |
pym/repoman/ebuild.py | 1 + |
33 |
pym/repoman/errors.py | 1 + |
34 |
pym/repoman/gpg.py | 1 + |
35 |
pym/repoman/main.py | 1 + |
36 |
pym/repoman/metadata.py | 1 + |
37 |
pym/repoman/modules/commit/repochecks.py | 1 + |
38 |
pym/repoman/profile.py | 1 + |
39 |
pym/repoman/qa_data.py | 1 + |
40 |
pym/repoman/repos.py | 1 + |
41 |
pym/repoman/scan.py | 1 + |
42 |
pym/repoman/scanner.py | 1 + |
43 |
pym/repoman/utilities.py | 1 + |
44 |
pym/repoman/vcs/vcs.py | 1 + |
45 |
pym/repoman/vcs/vcsstatus.py | 1 + |
46 |
32 files changed, 32 insertions(+) |
47 |
|
48 |
diff --git a/pym/repoman/_subprocess.py b/pym/repoman/_subprocess.py |
49 |
index 5449e64..dcdc985 100644 |
50 |
--- a/pym/repoman/_subprocess.py |
51 |
+++ b/pym/repoman/_subprocess.py |
52 |
@@ -1,3 +1,4 @@ |
53 |
+# -*- coding:utf-8 -*- |
54 |
|
55 |
|
56 |
import codecs |
57 |
diff --git a/pym/repoman/_xml.py b/pym/repoman/_xml.py |
58 |
index 7bf6698..0acda28 100644 |
59 |
--- a/pym/repoman/_xml.py |
60 |
+++ b/pym/repoman/_xml.py |
61 |
@@ -1,3 +1,4 @@ |
62 |
+# -*- coding:utf-8 -*- |
63 |
|
64 |
import sys |
65 |
import xml |
66 |
diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py |
67 |
index 0806cb5..f461703 100644 |
68 |
--- a/pym/repoman/actions.py |
69 |
+++ b/pym/repoman/actions.py |
70 |
@@ -1,3 +1,4 @@ |
71 |
+# -*- coding:utf-8 -*- |
72 |
|
73 |
from __future__ import print_function, unicode_literals |
74 |
|
75 |
diff --git a/pym/repoman/argparser.py b/pym/repoman/argparser.py |
76 |
index 1c9bd45..85e261d 100644 |
77 |
--- a/pym/repoman/argparser.py |
78 |
+++ b/pym/repoman/argparser.py |
79 |
@@ -1,3 +1,4 @@ |
80 |
+# -*- coding:utf-8 -*- |
81 |
# repoman: Argument parser |
82 |
# Copyright 2007-2014 Gentoo Foundation |
83 |
# Distributed under the terms of the GNU General Public License v2 |
84 |
diff --git a/pym/repoman/check_missingslot.py b/pym/repoman/check_missingslot.py |
85 |
index 3f79435..4a3c57b 100644 |
86 |
--- a/pym/repoman/check_missingslot.py |
87 |
+++ b/pym/repoman/check_missingslot.py |
88 |
@@ -1,3 +1,4 @@ |
89 |
+# -*- coding:utf-8 -*- |
90 |
# repoman: missing slot check |
91 |
# Copyright 2014 Gentoo Foundation |
92 |
# Distributed under the terms of the GNU General Public License v2 |
93 |
diff --git a/pym/repoman/checks/directories/files.py b/pym/repoman/checks/directories/files.py |
94 |
index b1d77df..9bb560c 100644 |
95 |
--- a/pym/repoman/checks/directories/files.py |
96 |
+++ b/pym/repoman/checks/directories/files.py |
97 |
@@ -1,3 +1,4 @@ |
98 |
+# -*- coding:utf-8 -*- |
99 |
|
100 |
'''repoman/checks/diretories/files.py |
101 |
|
102 |
diff --git a/pym/repoman/checks/ebuilds/checks.py b/pym/repoman/checks/ebuilds/checks.py |
103 |
index 5ebc6c1..245ab2b 100644 |
104 |
--- a/pym/repoman/checks/ebuilds/checks.py |
105 |
+++ b/pym/repoman/checks/ebuilds/checks.py |
106 |
@@ -1,3 +1,4 @@ |
107 |
+# -*- coding:utf-8 -*- |
108 |
# repoman: Checks |
109 |
# Copyright 2007-2014 Gentoo Foundation |
110 |
# Distributed under the terms of the GNU General Public License v2 |
111 |
diff --git a/pym/repoman/checks/ebuilds/errors.py b/pym/repoman/checks/ebuilds/errors.py |
112 |
index d5c8d2e..3090de0 100644 |
113 |
--- a/pym/repoman/checks/ebuilds/errors.py |
114 |
+++ b/pym/repoman/checks/ebuilds/errors.py |
115 |
@@ -1,3 +1,4 @@ |
116 |
+# -*- coding:utf-8 -*- |
117 |
# repoman: Error Messages |
118 |
# Copyright 2007-2013 Gentoo Foundation |
119 |
# Distributed under the terms of the GNU General Public License v2 |
120 |
diff --git a/pym/repoman/checks/ebuilds/fetches.py b/pym/repoman/checks/ebuilds/fetches.py |
121 |
index 077340d..32da21a 100644 |
122 |
--- a/pym/repoman/checks/ebuilds/fetches.py |
123 |
+++ b/pym/repoman/checks/ebuilds/fetches.py |
124 |
@@ -1,3 +1,4 @@ |
125 |
+# -*- coding:utf-8 -*- |
126 |
|
127 |
'''fetches.py |
128 |
Performs the src_uri fetchlist and files checks |
129 |
diff --git a/pym/repoman/checks/ebuilds/isebuild.py b/pym/repoman/checks/ebuilds/isebuild.py |
130 |
index f0c9a48..3992c9c 100644 |
131 |
--- a/pym/repoman/checks/ebuilds/isebuild.py |
132 |
+++ b/pym/repoman/checks/ebuilds/isebuild.py |
133 |
@@ -1,3 +1,4 @@ |
134 |
+# -*- coding:utf-8 -*- |
135 |
|
136 |
import stat |
137 |
|
138 |
diff --git a/pym/repoman/checks/ebuilds/keywords.py b/pym/repoman/checks/ebuilds/keywords.py |
139 |
index 235c751..9d2585e 100644 |
140 |
--- a/pym/repoman/checks/ebuilds/keywords.py |
141 |
+++ b/pym/repoman/checks/ebuilds/keywords.py |
142 |
@@ -1,3 +1,4 @@ |
143 |
+# -*- coding:utf-8 -*- |
144 |
|
145 |
'''keywords.py |
146 |
Perform KEYWORDS related checks |
147 |
diff --git a/pym/repoman/checks/ebuilds/manifests.py b/pym/repoman/checks/ebuilds/manifests.py |
148 |
index 3b8dec5..1ca4f94 100644 |
149 |
--- a/pym/repoman/checks/ebuilds/manifests.py |
150 |
+++ b/pym/repoman/checks/ebuilds/manifests.py |
151 |
@@ -1,3 +1,4 @@ |
152 |
+# -*- coding:utf-8 -*- |
153 |
|
154 |
import logging |
155 |
import sys |
156 |
diff --git a/pym/repoman/checks/ebuilds/misc.py b/pym/repoman/checks/ebuilds/misc.py |
157 |
index d735542..e2bef34 100644 |
158 |
--- a/pym/repoman/checks/ebuilds/misc.py |
159 |
+++ b/pym/repoman/checks/ebuilds/misc.py |
160 |
@@ -1,3 +1,4 @@ |
161 |
+# -*- coding:utf-8 -*- |
162 |
|
163 |
'''repoman/checks/ebuilds/misc.py |
164 |
Miscelaneous ebuild check functions''' |
165 |
diff --git a/pym/repoman/checks/ebuilds/pkgmetadata.py b/pym/repoman/checks/ebuilds/pkgmetadata.py |
166 |
index 8dc3f60..f22ef19 100644 |
167 |
--- a/pym/repoman/checks/ebuilds/pkgmetadata.py |
168 |
+++ b/pym/repoman/checks/ebuilds/pkgmetadata.py |
169 |
@@ -1,3 +1,4 @@ |
170 |
+# -*- coding:utf-8 -*- |
171 |
|
172 |
'''Package Metadata Checks operations''' |
173 |
|
174 |
diff --git a/pym/repoman/checks/ebuilds/thirdpartymirrors.py b/pym/repoman/checks/ebuilds/thirdpartymirrors.py |
175 |
index 061e71f..848dfb9 100644 |
176 |
--- a/pym/repoman/checks/ebuilds/thirdpartymirrors.py |
177 |
+++ b/pym/repoman/checks/ebuilds/thirdpartymirrors.py |
178 |
@@ -1,3 +1,4 @@ |
179 |
+# -*- coding:utf-8 -*- |
180 |
|
181 |
# import our initialized portage instance |
182 |
from repoman._portage import portage |
183 |
diff --git a/pym/repoman/checks/ebuilds/use_flags.py b/pym/repoman/checks/ebuilds/use_flags.py |
184 |
index 73680d0..ac21b47 100644 |
185 |
--- a/pym/repoman/checks/ebuilds/use_flags.py |
186 |
+++ b/pym/repoman/checks/ebuilds/use_flags.py |
187 |
@@ -1,3 +1,4 @@ |
188 |
+# -*- coding:utf-8 -*- |
189 |
|
190 |
'''use_flags.py |
191 |
Performs USE flag related checks |
192 |
diff --git a/pym/repoman/checks/herds/metadata.py b/pym/repoman/checks/herds/metadata.py |
193 |
index 3c67fcf..b4a433e 100644 |
194 |
--- a/pym/repoman/checks/herds/metadata.py |
195 |
+++ b/pym/repoman/checks/herds/metadata.py |
196 |
@@ -1,3 +1,4 @@ |
197 |
+# -*- coding:utf-8 -*- |
198 |
|
199 |
|
200 |
class UnknownHerdsError(ValueError): |
201 |
diff --git a/pym/repoman/copyrights.py b/pym/repoman/copyrights.py |
202 |
index 056cfda..761309a 100644 |
203 |
--- a/pym/repoman/copyrights.py |
204 |
+++ b/pym/repoman/copyrights.py |
205 |
@@ -1,3 +1,4 @@ |
206 |
+# -*- coding:utf-8 -*- |
207 |
|
208 |
|
209 |
import difflib |
210 |
diff --git a/pym/repoman/ebuild.py b/pym/repoman/ebuild.py |
211 |
index 1dddfb9..fdfb083 100644 |
212 |
--- a/pym/repoman/ebuild.py |
213 |
+++ b/pym/repoman/ebuild.py |
214 |
@@ -1,3 +1,4 @@ |
215 |
+# -*- coding:utf-8 -*- |
216 |
|
217 |
|
218 |
from portage import os |
219 |
diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py |
220 |
index 305eece..2ea4680 100644 |
221 |
--- a/pym/repoman/errors.py |
222 |
+++ b/pym/repoman/errors.py |
223 |
@@ -1,3 +1,4 @@ |
224 |
+# -*- coding:utf-8 -*- |
225 |
|
226 |
import sys |
227 |
|
228 |
diff --git a/pym/repoman/gpg.py b/pym/repoman/gpg.py |
229 |
index 90fe749..26e2432 100644 |
230 |
--- a/pym/repoman/gpg.py |
231 |
+++ b/pym/repoman/gpg.py |
232 |
@@ -1,3 +1,4 @@ |
233 |
+# -*- coding:utf-8 -*- |
234 |
|
235 |
from __future__ import print_function, unicode_literals |
236 |
|
237 |
diff --git a/pym/repoman/main.py b/pym/repoman/main.py |
238 |
index e232558..00d48e7 100755 |
239 |
--- a/pym/repoman/main.py |
240 |
+++ b/pym/repoman/main.py |
241 |
@@ -1,4 +1,5 @@ |
242 |
#!/usr/bin/python -bO |
243 |
+# -*- coding:utf-8 -*- |
244 |
# Copyright 1999-2015 Gentoo Foundation |
245 |
# Distributed under the terms of the GNU General Public License v2 |
246 |
|
247 |
diff --git a/pym/repoman/metadata.py b/pym/repoman/metadata.py |
248 |
index f2b63a7..70c07a8 100644 |
249 |
--- a/pym/repoman/metadata.py |
250 |
+++ b/pym/repoman/metadata.py |
251 |
@@ -1,3 +1,4 @@ |
252 |
+# -*- coding:utf-8 -*- |
253 |
|
254 |
import errno |
255 |
import logging |
256 |
diff --git a/pym/repoman/modules/commit/repochecks.py b/pym/repoman/modules/commit/repochecks.py |
257 |
index 8019e28..163466d 100644 |
258 |
--- a/pym/repoman/modules/commit/repochecks.py |
259 |
+++ b/pym/repoman/modules/commit/repochecks.py |
260 |
@@ -1,3 +1,4 @@ |
261 |
+# -*- coding:utf-8 -*- |
262 |
|
263 |
from __future__ import print_function, unicode_literals |
264 |
|
265 |
diff --git a/pym/repoman/profile.py b/pym/repoman/profile.py |
266 |
index 3634fb9..50da917 100644 |
267 |
--- a/pym/repoman/profile.py |
268 |
+++ b/pym/repoman/profile.py |
269 |
@@ -1,3 +1,4 @@ |
270 |
+# -*- coding:utf-8 -*- |
271 |
|
272 |
from __future__ import print_function, unicode_literals |
273 |
|
274 |
diff --git a/pym/repoman/qa_data.py b/pym/repoman/qa_data.py |
275 |
index b26559c..dddfb98 100644 |
276 |
--- a/pym/repoman/qa_data.py |
277 |
+++ b/pym/repoman/qa_data.py |
278 |
@@ -1,3 +1,4 @@ |
279 |
+# -*- coding:utf-8 -*- |
280 |
|
281 |
import logging |
282 |
|
283 |
diff --git a/pym/repoman/repos.py b/pym/repoman/repos.py |
284 |
index 72e5735..9a62e05 100644 |
285 |
--- a/pym/repoman/repos.py |
286 |
+++ b/pym/repoman/repos.py |
287 |
@@ -1,3 +1,4 @@ |
288 |
+# -*- coding:utf-8 -*- |
289 |
|
290 |
|
291 |
import io |
292 |
diff --git a/pym/repoman/scan.py b/pym/repoman/scan.py |
293 |
index fef6d82..28dfa15 100644 |
294 |
--- a/pym/repoman/scan.py |
295 |
+++ b/pym/repoman/scan.py |
296 |
@@ -1,3 +1,4 @@ |
297 |
+# -*- coding:utf-8 -*- |
298 |
|
299 |
import logging |
300 |
import os |
301 |
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py |
302 |
index 1e1a38e..ff32ac8 100644 |
303 |
--- a/pym/repoman/scanner.py |
304 |
+++ b/pym/repoman/scanner.py |
305 |
@@ -1,3 +1,4 @@ |
306 |
+# -*- coding:utf-8 -*- |
307 |
|
308 |
from __future__ import print_function, unicode_literals |
309 |
|
310 |
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py |
311 |
index 2a1f4d9..47b5aab 100644 |
312 |
--- a/pym/repoman/utilities.py |
313 |
+++ b/pym/repoman/utilities.py |
314 |
@@ -1,3 +1,4 @@ |
315 |
+# -*- coding:utf-8 -*- |
316 |
# repoman: Utilities |
317 |
# Copyright 2007-2013 Gentoo Foundation |
318 |
# Distributed under the terms of the GNU General Public License v2 |
319 |
diff --git a/pym/repoman/vcs/vcs.py b/pym/repoman/vcs/vcs.py |
320 |
index 9b77e8e..49d3058 100644 |
321 |
--- a/pym/repoman/vcs/vcs.py |
322 |
+++ b/pym/repoman/vcs/vcs.py |
323 |
@@ -1,3 +1,4 @@ |
324 |
+# -*- coding:utf-8 -*- |
325 |
|
326 |
from __future__ import print_function, unicode_literals |
327 |
|
328 |
diff --git a/pym/repoman/vcs/vcsstatus.py b/pym/repoman/vcs/vcsstatus.py |
329 |
index 30e00ad..4dc633e 100644 |
330 |
--- a/pym/repoman/vcs/vcsstatus.py |
331 |
+++ b/pym/repoman/vcs/vcsstatus.py |
332 |
@@ -1,3 +1,4 @@ |
333 |
+# -*- coding:utf-8 -*- |
334 |
|
335 |
|
336 |
# import our initialized portage instance |
337 |
-- |
338 |
2.5.3 |
339 |
|
340 |
|
341 |
|
342 |
-- |
343 |
Brian Dolbec <dolsen> |