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 3120113829C for ; Thu, 9 Jun 2016 19:38:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 701041424B; Thu, 9 Jun 2016 19:38:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E44BD1424B for ; Thu, 9 Jun 2016 19:38:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4C007340BD1 for ; Thu, 9 Jun 2016 19:38:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EEE2F16C5 for ; Thu, 9 Jun 2016 19:38:04 +0000 (UTC) From: "Slawek Lis" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Slawek Lis" Message-ID: <1465501082.e1744420c7377dd28f9fbc1c6736e47c6c21bb85.slis@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: slis X-VCS-Committer-Name: Slawek Lis X-VCS-Revision: e1744420c7377dd28f9fbc1c6736e47c6c21bb85 X-VCS-Branch: master Date: Thu, 9 Jun 2016 19:38:04 +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: 137b2952-dafd-46eb-b985-d415ce3f1351 X-Archives-Hash: f82e03e47bdb4a44cc7086e9b4f8b754 commit: e1744420c7377dd28f9fbc1c6736e47c6c21bb85 Author: Slawek Lis gentoo org> AuthorDate: Thu Jun 9 19:38:02 2016 +0000 Commit: Slawek Lis gentoo org> CommitDate: Thu Jun 9 19:38:02 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=e1744420 Excluding masked files from rebuilding. This should fix a bug #568902 pym/gentoolkit/revdep_rebuild/analyse.py | 55 +++++++++++++++++++------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index c9c5f71..59240b4 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -116,7 +116,7 @@ def extract_dependencies_from_la(la, libraries, to_check, logger): class LibCheck(object): - def __init__(self, scanned_files, logger, searchlibs=None, searchbits=None): + def __init__(self, scanned_files, logger, searchlibs=None, searchbits=None, all_masks=None): '''LibCheck init function. @param scanned_files: optional dictionary if the type created by @@ -130,6 +130,7 @@ class LibCheck(object): self.logger = logger self.searchlibs = searchlibs self.searchbits = sorted(searchbits) or ['32', '64'] + self.all_masks = all_masks self.logger.debug("\tLibCheck.__init__(), new searchlibs: %s" %(self.searchbits)) if searchlibs: self.smsg = '\tLibCheck.search(), Checking for %s bit dependants' @@ -213,6 +214,12 @@ class LibCheck(object): for filename, needed in filepaths.items(): for l in needed: if self.check(l): + if l in self.all_masks: + self.logger.debug('\tLibrary %s ignored as it is masked' % l) + continue + if filename in self.all_masks: + self.logger.debug('\tFile %s ignored as it is masked' % filename) + continue if not bits in found_libs: found_libs[bits] = {} try: @@ -275,6 +282,26 @@ def analyse(settings, logger, libraries=None, la_libraries=None, _libs_to_check = set()''' searchbits.update(['64', '32']) + masked_dirs, masked_files, ld = parse_revdep_config(settings['REVDEP_CONFDIR']) + masked_dirs.update([ + '/lib/modules', + '/lib32/modules', + '/lib64/modules', + ] + ) + + all_masks = masked_dirs.copy() + all_masks.update(masked_files) + logger.debug("\tall_masks:") + for x in sorted(all_masks): + logger.debug('\t\t%s' % (x)) + + + if '64' not in searchbits: + masked_dirs.update(['/lib64', '/usr/lib64']) + elif '32' not in searchbits: + masked_dirs.update(['/lib32', '/usr/lib32']) + if libraries and la_libraries and libraries_links and binaries: logger.info(blue(' * ') + bold('Found a valid cache, skipping collecting phase')) @@ -287,20 +314,8 @@ def analyse(settings, logger, libraries=None, la_libraries=None, bold('Collecting system binaries and libraries')) bin_dirs, lib_dirs = prepare_search_dirs(logger, settings) - masked_dirs, masked_files, ld = \ - parse_revdep_config(settings['REVDEP_CONFDIR']) lib_dirs.update(ld) bin_dirs.update(ld) - masked_dirs.update([ - '/lib/modules', - '/lib32/modules', - '/lib64/modules', - ] - ) - if '64' not in searchbits: - masked_dirs.update(['/lib64', '/usr/lib64']) - elif '32' not in searchbits: - masked_dirs.update(['/lib32', '/usr/lib32']) logger.debug('\tanalyse(), bin directories:') for x in sorted(bin_dirs): @@ -320,11 +335,6 @@ def analyse(settings, logger, libraries=None, la_libraries=None, stime = current_milli_time() logger.info(green(' * ') + bold('Collecting dynamic linking informations')) - all_masks = masked_dirs.copy() - all_masks.update(masked_files) - logger.debug("\tall_masks:") - for x in sorted(all_masks): - logger.debug('\t\t%s' % (x)) libraries, la_libraries, libraries_links = \ collect_libraries_from_dir(lib_dirs, all_masks, logger) @@ -357,7 +367,7 @@ def analyse(settings, logger, libraries=None, la_libraries=None, % (len(libs_and_bins), len(libraries)+len(libraries_links)) ) - libcheck = LibCheck(scanned_files, logger, _libs_to_check, searchbits) + libcheck = LibCheck(scanned_files, logger, _libs_to_check, searchbits, all_masks) broken_pathes = libcheck.process_results(libcheck.search()) @@ -365,9 +375,10 @@ def analyse(settings, logger, libraries=None, la_libraries=None, libraries.union(libraries_links), _libs_to_check, logger) broken_pathes += broken_la - logger.warning(green(' * ') + bold('Assign files to packages')) - - return assign_packages(broken_pathes, logger, settings) + if broken_pathes: + logger.warning(green(' * ') + bold('Assign files to packages')) + return assign_packages(broken_pathes, logger, settings) + return None, None # no need to assign anything if __name__ == '__main__':