From: "Slawek Lis" <slis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/
Date: Thu, 9 Jun 2016 19:38:04 +0000 (UTC) [thread overview]
Message-ID: <1465501082.e1744420c7377dd28f9fbc1c6736e47c6c21bb85.slis@gentoo> (raw)
commit: e1744420c7377dd28f9fbc1c6736e47c6c21bb85
Author: Slawek Lis <slis <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 9 19:38:02 2016 +0000
Commit: Slawek Lis <slis <AT> gentoo <DOT> 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__':
next reply other threads:[~2016-06-09 19:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 19:38 Slawek Lis [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-09 1:49 [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/ Mike Gilbert
2020-02-14 18:13 Zac Medico
2019-08-19 3:41 Zac Medico
2019-08-19 3:41 Zac Medico
2017-05-05 19:38 Paul Varner
2017-03-10 17:31 Zac Medico
2016-12-29 21:36 Jason Donenfeld
2016-09-15 15:05 Brian Dolbec
2016-09-15 15:05 Brian Dolbec
2016-08-15 21:06 Paul Varner
2016-05-18 15:41 Brian Dolbec
2016-05-18 15:41 Brian Dolbec
2016-05-18 15:14 Brian Dolbec
2016-05-18 6:10 Brian Dolbec
2016-02-25 21:26 Brian Dolbec
2016-01-18 0:00 Jason Donenfeld
2015-12-20 2:05 Brian Dolbec
2015-12-16 17:53 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465501082.e1744420c7377dd28f9fbc1c6736e47c6c21bb85.slis@gentoo \
--to=slis@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox