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 DF29058973 for ; Wed, 27 Jan 2016 23:15:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F336C21C08F; Wed, 27 Jan 2016 23:15:40 +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 4651A21C090 for ; Wed, 27 Jan 2016 23:15:40 +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 8575F340A9E for ; Wed, 27 Jan 2016 23:15:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 602BE125E for ; Wed, 27 Jan 2016 23:15:34 +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: <1453934666.563f65e4b167f213981ec030c71ebd35a2ca9780.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: 563f65e4b167f213981ec030c71ebd35a2ca9780 X-VCS-Branch: repoman Date: Wed, 27 Jan 2016 23:15:34 +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: 91d29999-16bb-48be-8e68-546c428fdd3a X-Archives-Hash: 86717a649c0f15e3813d67c228b8ff43 commit: 563f65e4b167f213981ec030c71ebd35a2ca9780 Author: Brian Dolbec gentoo org> AuthorDate: Thu Jan 21 18:29:07 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Wed Jan 27 22:44:26 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=563f65e4 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 2661f14..f7ff9fb 100644 --- a/pym/repoman/_xml.py +++ b/pym/repoman/_xml.py @@ -60,6 +60,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): @@ -68,7 +69,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")