1 |
commit: 2ec2486fd56b4e673dbf544c5667dd7cf9d683bf |
2 |
Author: Dirkjan Ochtman <dirkjan <AT> ochtman <DOT> nl> |
3 |
AuthorDate: Mon Jan 25 18:42:41 2016 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 06:38:34 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2ec2486f |
7 |
|
8 |
repoman: Move some metdata_* variables to module it's used |
9 |
|
10 |
pym/repoman/metadata.py | 4 ---- |
11 |
pym/repoman/modules/scan/metadata/pkgmetadata.py | 9 ++++++--- |
12 |
2 files changed, 6 insertions(+), 7 deletions(-) |
13 |
|
14 |
diff --git a/pym/repoman/metadata.py b/pym/repoman/metadata.py |
15 |
index 7a514dc..a980184 100644 |
16 |
--- a/pym/repoman/metadata.py |
17 |
+++ b/pym/repoman/metadata.py |
18 |
@@ -28,10 +28,6 @@ if sys.hexversion >= 0x3000000: |
19 |
if sys.hexversion >= 0x3000000: |
20 |
basestring = str |
21 |
|
22 |
-metadata_xml_encoding = 'UTF-8' |
23 |
-metadata_xml_declaration = '<?xml version="1.0" encoding="%s"?>' \ |
24 |
- % (metadata_xml_encoding,) |
25 |
-metadata_doctype_name = 'pkgmetadata' |
26 |
metadata_dtd_uri = 'http://www.gentoo.org/dtd/metadata.dtd' |
27 |
metadata_xsd_uri = 'http://www.gentoo.org/xml-schema/metadata.xsd' |
28 |
# force refetch if the local copy creation time is older than this |
29 |
|
30 |
diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py |
31 |
index 3b48b8e..a7150a9 100644 |
32 |
--- a/pym/repoman/modules/scan/metadata/pkgmetadata.py |
33 |
+++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py |
34 |
@@ -23,9 +23,7 @@ except (ImportError, SystemError, RuntimeError, Exception): |
35 |
|
36 |
# import our initialized portage instance |
37 |
from repoman._portage import portage |
38 |
-from repoman.metadata import ( |
39 |
- metadata_xml_encoding, metadata_doctype_name, |
40 |
- metadata_dtd_uri, metadata_xml_declaration, parse_metadata_use) |
41 |
+from repoman.metadata import metadata_dtd_uri, parse_metadata_use |
42 |
from repoman.checks.herds.herdbase import get_herd_base |
43 |
from repoman.checks.herds.metadata import check_metadata, UnknownHerdsError |
44 |
from repoman._xml import _XMLParser, _MetadataTreeBuilder, XmlLint |
45 |
@@ -38,6 +36,11 @@ from portage.dep import Atom |
46 |
|
47 |
from .use_flags import USEFlagChecks |
48 |
|
49 |
+metadata_xml_encoding = 'UTF-8' |
50 |
+metadata_xml_declaration = '<?xml version="1.0" encoding="%s"?>' \ |
51 |
+ % (metadata_xml_encoding,) |
52 |
+metadata_doctype_name = 'pkgmetadata' |
53 |
+ |
54 |
|
55 |
class PkgMetadata(ScanBase, USEFlagChecks): |
56 |
'''Package metadata.xml checks''' |