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 4A7AF1384B4 for ; Sun, 20 Dec 2015 02:05:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 31E8DE08D6; Sun, 20 Dec 2015 02:05:35 +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 CAF0DE08D6 for ; Sun, 20 Dec 2015 02:05:34 +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 8B7F334016B for ; Sun, 20 Dec 2015 02:05:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E445DCAF for ; Sun, 20 Dec 2015 02:05:27 +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: <1450577023.1fbd7ec8a46c359c5ef98168156a91ba05cf6a6f.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/revdep_rebuild/analyse.py X-VCS-Directories: pym/gentoolkit/revdep_rebuild/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 1fbd7ec8a46c359c5ef98168156a91ba05cf6a6f X-VCS-Branch: master Date: Sun, 20 Dec 2015 02:05:27 +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: c3197d6e-b51d-4a64-a409-7b04bf0e2120 X-Archives-Hash: 782d9824b73e4df06f70fdb1aafa7ecb commit: 1fbd7ec8a46c359c5ef98168156a91ba05cf6a6f Author: Brian Dolbec gentoo org> AuthorDate: Sun Dec 20 02:03:43 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sun Dec 20 02:03:43 2015 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=1fbd7ec8 revdep-rebuild/analyse.py: Account for more than 5 parts to report the error bug 586752 As suggested by Zac Medico, the %F output does have the possibility of containing spaces, breaking a space separated output. Change the format string to delimit on a semicolon to split it on. Traceback: File "/usr/lib64/python3.4/site-packages/gentoolkit/revdep_rebuild/analyse.py", line 47, in scan_files filename, sfilename, soname, needed, bits = parts ValueError: too many values to unpack (expected 5) pym/gentoolkit/revdep_rebuild/analyse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index 056e421..92233ab 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -31,7 +31,7 @@ def scan_files(libs_and_bins, cmd_max_args, logger, searchbits): ''' stime = current_milli_time() scanned_files = {} # {bits: {soname: (filename, needed), ...}, ...} - lines = scan(['-BF', '%F %f %S %n %M'], + lines = scan(['-BF', '%F;%f;%S;%n;%M'], libs_and_bins, cmd_max_args, logger) ftime = current_milli_time() logger.debug("\tscan_files(); total time to get scanelf data is " @@ -39,8 +39,8 @@ def scan_files(libs_and_bins, cmd_max_args, logger, searchbits): stime = current_milli_time() count = 0 for line in lines: - parts = line.split(' ') - if len(parts) < 5: + parts = line.split(';') + if len(parts) != 5: logger.error("\tscan_files(); error processing lib: %s" % line) logger.error("\tscan_files(); parts = %s" % str(parts)) continue @@ -205,7 +205,7 @@ class LibCheck(object): try: scanned = scanned_files[bits] except KeyError: - self.logger.debug('There are no %s-bit libraries'%bits) + self.logger.debug('There are no %s-bit libraries'%bits) continue self.logger.debug(self.smsg % bits) self.setlibs(sorted(scanned), bits)