From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5F30F58973 for ; Thu, 21 Jan 2016 19:42:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF66C21C053; Thu, 21 Jan 2016 19:42:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 382A3E0871 for ; Thu, 21 Jan 2016 19:42:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6D6BD3409E2 for ; Thu, 21 Jan 2016 19:42:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3406A10B8 for ; Thu, 21 Jan 2016 19:42:22 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1453404500.fd22acf104e1a2a501ea8ae940de11f62dbd58a6.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/metadata/, pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/_xml.py pym/repoman/modules/scan/metadata/pkgmetadata.py X-VCS-Directories: pym/repoman/ pym/repoman/modules/scan/metadata/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: fd22acf104e1a2a501ea8ae940de11f62dbd58a6 X-VCS-Branch: repoman Date: Thu, 21 Jan 2016 19:42:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9aee0eeb-2107-4f86-82c0-0c4481daf8b1 X-Archives-Hash: 4a9789f52fba7ed26c869328c8a7ffcb commit: fd22acf104e1a2a501ea8ae940de11f62dbd58a6 Author: Brian Dolbec gentoo org> AuthorDate: Thu Jan 21 18:29:07 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Jan 21 19:28:20 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fd22acf1 repoman: Fix a traceback due to xmlint not being installed for a manifest generation Mike helped find teh fact that self.binary was None, causing the misleading traceback. Tighten up the logic in XmlLint. Bypass the PkgMetadata check for manifest mode. floppym@naomi btrfs-progs % repoman manifest >>> Creating Manifest for /home/floppym/repos/gentoo/sys-fs/btrfs-progs Traceback (most recent call last): File "/home/floppym/bin/repoman", line 37, in repoman_main(sys.argv[1:]) File "/home/floppym/src/portage/pym/repoman/main.py", line 111, in repoman_main can_force = scanner.scan_pkgs(can_force) File "/home/floppym/src/portage/pym/repoman/scanner.py", line 242, in scan_pkgs rdata = func(**dynamic_data) File "/home/floppym/src/portage/pym/repoman/modules/scan/metadata/pkgmetadata.py", line 180, in check if not self.xmllint.check(checkdir, repolevel): File "/home/floppym/src/portage/pym/repoman/_xml.py", line 98, in check os.path.join(checkdir, "metadata.xml")))) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' pym/repoman/_xml.py | 2 +- pym/repoman/modules/scan/metadata/pkgmetadata.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/repoman/_xml.py b/pym/repoman/_xml.py index 43fc930..334377d 100644 --- a/pym/repoman/_xml.py +++ b/pym/repoman/_xml.py @@ -58,6 +58,7 @@ class XmlLint(object): self.repoman_settings = repoman_settings self._is_capable = metadata_dtd is not None self.binary = None + self._is_capable = False self._check_capable() def _check_capable(self): @@ -66,7 +67,6 @@ class XmlLint(object): self.binary = find_binary('xmllint') if not self.binary: print(red("!!! xmllint not found. Can't check metadata.xml.\n")) - self._is_capable = False elif not self._is_capable: if not fetch_metadata_dtd(self.metadata_dtd, self.repoman_settings): sys.exit(1) diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py index 220fd23..8e93457 100644 --- a/pym/repoman/modules/scan/metadata/pkgmetadata.py +++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py @@ -71,6 +71,9 @@ class PkgMetadata(ScanBase): repolevel = kwargs.get('repolevel') self.musedict = {} + if self.options.mode in ['manifest']: + return {'continue': False, 'muselist': frozenset(self.musedict)} + # metadata.xml file check if "metadata.xml" not in checkdirlist: self.qatracker.add_error("metadata.missing", xpkg + "/metadata.xml")