1 |
commit: 55943b69a42c292bc0922a22d71f9d992ea035e7 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 4 06:08:50 2016 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 4 06:08:50 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=55943b69 |
7 |
|
8 |
repoman/modules/.../pkgmetadata.py: Fix failed missing doctype detection |
9 |
|
10 |
The docinfo is always created, so is not valid to use like a boolean to detect a missing |
11 |
doctype. |
12 |
doctype is a null string or equivalent and as such the correct choice for the if statement. |
13 |
|
14 |
Failure discoverd by: Göktürk Yüksek <gokturk <AT> binghamton.edu> |
15 |
Thank you |
16 |
|
17 |
pym/repoman/modules/scan/metadata/pkgmetadata.py | 2 +- |
18 |
1 file changed, 1 insertion(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py |
21 |
index c76922b..8b31e3f 100644 |
22 |
--- a/pym/repoman/modules/scan/metadata/pkgmetadata.py |
23 |
+++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py |
24 |
@@ -102,7 +102,7 @@ class PkgMetadata(ScanBase, USEFlagChecks): |
25 |
"xml declaration encoding should be '%s', not '%s'" % |
26 |
(xpkg, metadata_xml_encoding, xml_encoding)) |
27 |
|
28 |
- if not _metadata_xml.docinfo: |
29 |
+ if not _metadata_xml.docinfo.doctype: |
30 |
metadata_bad = True |
31 |
self.qatracker.add_error( |
32 |
"metadata.bad", |