[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/eshowkw/
commit: b0543b42f7921112c80a3f20e5a3236a4818 Author: Michał Górny mgorny AT gentoo DOT org AuthorDate: Sun Aug 9 09:31:33 2015 + Commit: Michał Górny mgorny AT gentoo DOT org CommitDate: Sun Aug 9 09:34:01 2015 + URL:https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=b0543b42 eshowkw: Gray out unstable arches pym/gentoolkit/eshowkw/keywords_header.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pym/gentoolkit/eshowkw/keywords_header.py b/pym/gentoolkit/eshowkw/keywords_header.py index f7e3e50..610fcaf 100644 --- a/pym/gentoolkit/eshowkw/keywords_header.py +++ b/pym/gentoolkit/eshowkw/keywords_header.py @@ -11,6 +11,7 @@ from gentoolkit.eshowkw.display_pretty import align_string class keywords_header: __IMPARCHS = [ 'arm', 'amd64', 'x86' ] + __UNSTABLE_ARCHS = [ 'arm64', 'm68k', 'mips', 's390', 'sh' ] __ADDITIONAL_FIELDS = [ 'unused', 'slot' ] __EXTRA_FIELDS = [ 'repo' ] @@ -60,6 +61,8 @@ class keywords_header: keyword = '%'.join(list(keyword)) if tmp2 in self.__IMPARCHS: tmp.append(colorize_string('darkyellow', keyword)) + elif tmp2 in self.__UNSTABLE_ARCHS: + tmp.append(colorize_string('darkgray', keyword)) else: tmp.append(keyword) return tmp
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/
commit: 1c0c61bc2b4ed4d53612d5effb36c8483fea1bca Author: Paul Varner fuzzyray AT gentoo DOT org AuthorDate: Tue Jun 2 22:09:14 2015 + Commit: Paul Varner fuzzyray AT gentoo DOT org CommitDate: Tue Jun 2 22:09:14 2015 + URL:https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=1c0c61bc gentoolkit: Fix query.py to properly work with sets (Bug 546726) pym/gentoolkit/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/query.py b/pym/gentoolkit/query.py index c0ce977..df6e2fd 100644 --- a/pym/gentoolkit/query.py +++ b/pym/gentoolkit/query.py @@ -362,7 +362,7 @@ class Query(CPV): q = self.query for atom in atoms: - self.query = atom + self.query = str(atom) result.extend(self._do_simple_lookup(show_progress=False)) self.query = q
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: ea14aa4c915abbaf293d77ed70a947648143f401 Author: Mike Gilbert floppym AT gentoo DOT org AuthorDate: Wed May 27 17:20:35 2015 + Commit: Mike Gilbert floppym AT gentoo DOT org CommitDate: Wed May 27 17:20:35 2015 + URL:https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=ea14aa4c revdep-rebuild: Remove broken NO_PRETEND setting This hasn't worked since the argparse conversion. pym/gentoolkit/revdep_rebuild/rebuild.py | 8 pym/gentoolkit/revdep_rebuild/settings.py | 5 - 2 files changed, 13 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index d35906e..23fa694 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -134,14 +134,6 @@ def main(settings=None, logger=None): logger.warn(blue(' * ') + yellow('You are not root, adding --pretend to portage options')) settings['PRETEND'] = True - elif not settings['PRETEND'] \ - and settings['IS_DEV'] \ - and not settings['NO_PRETEND']: - logger.warn(blue(' * ') + - yellow('Adding --pretend to portage options')) - logger.info(blue(' * ') + - 'If you\'re sure, you can add --no-pretend to revdep options') - settings['PRETEND'] = True logger.debug(\tmain(), _libs_to_check = %s % str(_libs_to_check)) diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py index 3a653a5..08220f8 100644 --- a/pym/gentoolkit/revdep_rebuild/settings.py +++ b/pym/gentoolkit/revdep_rebuild/settings.py @@ -27,11 +27,6 @@ DEFAULTS = { #if program should use temporary files from previous run 'USE_TMP_FILES': True, - #True for dev. version, False for stable - #used when IS_DEV is True, False forces to call emerge with --pretend - # can be set True from the cli with the --no-pretend option - 'IS_DEV': True, - 'NO_PRETEND': False, 'VERBOSITY': 1, 'quiet': False,
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 758d932ca31ceb323bb988108e3f64e05cd5731d Author: Paul Varner fuzzyray AT gentoo DOT org AuthorDate: Wed Nov 12 21:28:58 2014 + Commit: Paul Varner fuzzyray AT gentoo DOT org CommitDate: Wed Nov 12 21:28:58 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=758d932c revdep-rebuild.py: Fix recent changes to work with Python 3 --- pym/gentoolkit/revdep_rebuild/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py index fa91685..3a653a5 100644 --- a/pym/gentoolkit/revdep_rebuild/settings.py +++ b/pym/gentoolkit/revdep_rebuild/settings.py @@ -53,7 +53,7 @@ def parse_options(): # TODO: Verify: options: no-ld-path, no-order, no-progress #are not appliable - from rebuild import VERSION, APP_NAME + from .rebuild import VERSION, APP_NAME settings = DEFAULTS.copy() parser = argparse.ArgumentParser(
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 3a9aced06871aa68dcc27e5eba1e56608ecc587d Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Wed Nov 12 06:50:01 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Wed Nov 12 06:50:01 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=3a9aced0 --library option - partial filename checking --- pym/gentoolkit/revdep_rebuild/analyse.py | 33 +++- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index 556812d..c0e7231 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -148,24 +148,21 @@ class LibCheck(object): '''Internal function. Use the class's setlibs variable''' sonames = [] for s in self.searchlibs: - par, soname = os.path.split(s) - if par: - # consider as this is full pathname - # we need soname only - - if os.path.exists(s): - # try to extract some more info - for line in scan(['-BF', '%f %S %M'], [s], 1, self.logger): - _, soname, bits = line.split() - bits = bits[8:] - if bits == b: - # we don't want to look in inappropriate arch's libs - sonames.append(soname) - continue - sonames.append(soname) - else: - # this is only filename or it's part - sonames.append(soname) + if s in self.scanned_files[b].keys(): + sonames.append(s) + continue + + found_partial = [a for a in self.scanned_files[b].keys() if s in a] + if found_partial: + sonames += found_partial + continue + + for k, v in self.scanned_files[b].items(): + for vv in v.keys(): + if s in vv: + sonames.append(k) + break + self.alllibs = '|'.join(sonames) + '|' self.logger.debug(\tLibCheck._setslibs(), new alllibs: %s %(self.alllibs))
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 1d42d9f56121932daff89a0676956fe16884c60f Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Fri Nov 7 20:39:54 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Fri Nov 7 20:39:54 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=1d42d9f5 revdep --library fixes --- pym/gentoolkit/revdep_rebuild/analyse.py | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index c553526..556812d 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -146,8 +146,27 @@ class LibCheck(object): def _setslibs(self, l, b): '''Internal function. Use the class's setlibs variable''' - self.alllibs = '|'.join( - [x for x in self.searchlibs if ('lib%s' % (b) in x)]) + '|' + sonames = [] + for s in self.searchlibs: + par, soname = os.path.split(s) + if par: + # consider as this is full pathname + # we need soname only + + if os.path.exists(s): + # try to extract some more info + for line in scan(['-BF', '%f %S %M'], [s], 1, self.logger): + _, soname, bits = line.split() + bits = bits[8:] + if bits == b: + # we don't want to look in inappropriate arch's libs + sonames.append(soname) + continue + sonames.append(soname) + else: + # this is only filename or it's part + sonames.append(soname) + self.alllibs = '|'.join(sonames) + '|' self.logger.debug(\tLibCheck._setslibs(), new alllibs: %s %(self.alllibs)) @@ -248,15 +267,15 @@ def analyse(settings, logger, libraries=None, la_libraries=None, searchbits = set() - if _libs_to_check: + '''if _libs_to_check: for lib in _libs_to_check: if lib64 in lib: searchbits.add('64') elif lib32 in lib: searchbits.add('32') else: - _libs_to_check = set() - searchbits.update(['64', '32']) + _libs_to_check = set()''' + searchbits.update(['64', '32']) if libraries and la_libraries and libraries_links and binaries: logger.info(blue(' * ') +
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: bb2f5a95536dedf3fe300f7bcf5a385d255c3331 Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Fri Nov 7 20:08:48 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Fri Nov 7 20:08:48 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=bb2f5a95 help text update --- pym/gentoolkit/revdep_rebuild/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py index e42a242..fa91685 100644 --- a/pym/gentoolkit/revdep_rebuild/settings.py +++ b/pym/gentoolkit/revdep_rebuild/settings.py @@ -79,8 +79,8 @@ def parse_options(): parser.add_argument('-L', '--library', action='append', help='Unconditionally emerge existing packages that use ' - 'the library with NAME. NAME can be a full or partial ' - 'name') + 'the library with NAME. NAME can be a full path, full ' + 'or partial name') parser.add_argument('-l', '--no-ld-path', action='store_true', help='Do not set LD_LIBRARY_PATH') @@ -89,7 +89,7 @@ def parse_options(): help='Do not check the build order ' '(Saves time, but may cause breakage.)') parser.add_argument('-p', '--pretend', -action='store_true', +action='store_true', help='Do a trial run without actually emerging anything ' '(also passed to emerge command)')
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 615222489e54a707fd87342e6c8801c7e5eb1b68 Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Wed Nov 5 12:46:24 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Wed Nov 5 12:46:24 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=61522248 using debug logging --- pym/gentoolkit/revdep_rebuild/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py index 744b730..00c7e28 100644 --- a/pym/gentoolkit/revdep_rebuild/settings.py +++ b/pym/gentoolkit/revdep_rebuild/settings.py @@ -109,9 +109,9 @@ def parse_options(): parser.add_argument('portage_options', nargs='*') args = parser.parse_args() - settings['VERBOSITY'] = 3 if args.debug else 2 if args.verbose else 0 if args.quiet else 1 settings['quiet'] = args.quiet + settings['debug'] = args.debug settings['PRETEND'] = args.pretend settings['nocolor'] = args.nocolor if args.library:
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: c20844cad28caf6554e90d65f8da3d072a2adb9f Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Fri Nov 7 20:38:35 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Fri Nov 7 20:38:35 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=c20844ca logging level --- pym/gentoolkit/revdep_rebuild/rebuild.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index fcbd76e..d35906e 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -53,7 +53,7 @@ def init_logger(settings): logger.setLevel(logging.ERROR) elif settings['VERBOSITY'] == 2: logger.setLevel(logging.INFO) - elif settings['VERBOSITY'] == 3: + elif settings['VERBOSITY'] == 3 or settings['debug']: logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.WARNING) @@ -107,7 +107,6 @@ def main(settings=None, logger=None): @param logger: python logging module defaults to init_logger(settings) @return boolean success/failure - if settings is None: print(NO Input settings, using defaults...) settings = DEFAULTS.copy()
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 17d016032df3a9af9cbdd8c6a1eec800fb4bd2f1 Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Wed Nov 5 11:27:54 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Wed Nov 5 11:27:54 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=17d01603 updated default cache location for non-root --- pym/gentoolkit/revdep_rebuild/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py index cadd5f2..744b730 100644 --- a/pym/gentoolkit/revdep_rebuild/settings.py +++ b/pym/gentoolkit/revdep_rebuild/settings.py @@ -17,7 +17,7 @@ DEFAULTS = { 'DEFAULT_ENV_FILE': os.path.join(portage.root, 'etc/profile.env'), 'REVDEP_CONFDIR': os.path.join(portage.root, 'etc/revdep-rebuild/'), 'PKG_DIR': os.path.join(portage.root, 'var/db/pkg/'), - 'DEFAULT_TMP_DIR': os.path.join(portage.root, '/var/cache/revdep-rebuild'), #cache default location + 'DEFAULT_TMP_DIR': os.path.join(portage.root, '/tmp/revdep-rebuild' if os.getgid() else '/var/cache/revdep-rebuild'), #cache default location # number of maximum allowed files to be parsed at once 'CMD_MAX_ARGS': 1000,
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 09c1115e0a3c4d12549993fb8a8a13a5723f5094 Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Fri Nov 7 12:11:33 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Fri Nov 7 12:11:33 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=09c1115e loggin update --- pym/gentoolkit/revdep_rebuild/settings.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py index 00c7e28..e42a242 100644 --- a/pym/gentoolkit/revdep_rebuild/settings.py +++ b/pym/gentoolkit/revdep_rebuild/settings.py @@ -111,7 +111,6 @@ def parse_options(): args = parser.parse_args() settings['VERBOSITY'] = 3 if args.debug else 2 if args.verbose else 0 if args.quiet else 1 settings['quiet'] = args.quiet - settings['debug'] = args.debug settings['PRETEND'] = args.pretend settings['nocolor'] = args.nocolor if args.library:
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: ed4f69668755d222ae782d09e810c5bb1a94e67a Author: Paul Varner fuzzyray AT gentoo DOT org AuthorDate: Thu Oct 30 18:55:25 2014 + Commit: Paul Varner fuzzyray AT gentoo DOT org CommitDate: Thu Oct 30 18:55:25 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=ed4f6966 revdep-rebuild: Fix python version to honor --debug --- pym/gentoolkit/revdep_rebuild/rebuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index 216714c..fcbd76e 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -53,7 +53,7 @@ def init_logger(settings): logger.setLevel(logging.ERROR) elif settings['VERBOSITY'] == 2: logger.setLevel(logging.INFO) - elif settings['debug']: + elif settings['VERBOSITY'] == 3: logger.setLevel(logging.DEBUG) else: logger.setLevel(logging.WARNING)
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: d1452c3b44dddadbb4d46b9e813b25f8c742d54f Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Thu Aug 28 07:20:06 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Thu Aug 28 07:20:06 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=d1452c3b output all messages into stdout instead of stderr --- pym/gentoolkit/revdep_rebuild/rebuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index 9d5bf9b..216714c 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -45,7 +45,7 @@ __productname__ = revdep-ng def init_logger(settings): Creates and iitializes our logger according to the settings logger = logging.getLogger() - log_handler = logging.StreamHandler() + log_handler = logging.StreamHandler(sys.stdout) log_fmt = logging.Formatter('%(msg)s') log_handler.setFormatter(log_fmt) logger.addHandler(log_handler)
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/, pym/gentoolkit/test/
commit: 3a8098d3f1e9ba6defc8521cf861cc9c9f60f61d Author: Brian Dolbec dolsen AT gentoo DOT org AuthorDate: Fri Aug 29 03:57:59 2014 + Commit: Brian Dolbec brian.dolbec AT gmail DOT com CommitDate: Fri Aug 29 04:01:13 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=3a8098d3 Fix two typos --- pym/gentoolkit/revdep_rebuild/analyse.py | 2 +- pym/gentoolkit/test/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index bd1b6b7..c553526 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -174,7 +174,7 @@ class LibCheck(object): '''Searches the scanned files for broken lib links or for libs to search for - @param scanned_files: optional dictionary if the type created by + @param scanned_files: optional dictionary of the type created by scan_files(). Defaults to the class instance of scanned_files @ returns: dict: {bit_length: {found_lib: set(file_paths)}}. ''' diff --git a/pym/gentoolkit/test/__init__.py b/pym/gentoolkit/test/__init__.py index ea0f3c7..946b552 100644 --- a/pym/gentoolkit/test/__init__.py +++ b/pym/gentoolkit/test/__init__.py @@ -22,4 +22,4 @@ except NameError: return 1 # just to be safe, __lt__/ __gt__ above should have thrown # something like this already - raise TypeError(Comparison between onorderable types) + raise TypeError(Comparison between unorderable types)
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
commit: 1351a6b8f09ab2f4a7469d6e2be874b56a31d3c4 Author: Brian Dolbec dolsen AT gentoo DOT org AuthorDate: Fri Aug 29 03:56:22 2014 + Commit: Brian Dolbec brian.dolbec AT gmail DOT com CommitDate: Fri Aug 29 04:01:13 2014 + URL: http://sources.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=1351a6b8 equery has: Add CFLAGS, CXXFLAGS, LDFLAGS to strip the leading '-' Strip the leading '-' from values found in these files. --- pym/gentoolkit/equery/has.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/equery/has.py b/pym/gentoolkit/equery/has.py index 15c60b9..180f7f0 100644 --- a/pym/gentoolkit/equery/has.py +++ b/pym/gentoolkit/equery/has.py @@ -74,7 +74,7 @@ def query_in_env(query, env_var, pkg): Check if the query is in the pkg's environment. try: - if env_var in (USE, IUSE): + if env_var in (USE, IUSE, CFLAGS, CXXFLAGS, LDFLAGS): results = set( [x.lstrip(+-) for x in pkg.environment(env_var).split()] )
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/equery/
commit: 9a33ceffe2e0045bf75b1209a90e9a53530d4e0d Author: Tobias Heinlein keytoaster AT gentoo DOT org AuthorDate: Sat Apr 19 16:39:03 2014 + Commit: Tobias Heinlein keytoaster AT gentoo DOT org CommitDate: Sat Apr 19 18:23:23 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=9a33ceff equery: Don't always print the license field (bug #508114). --- pym/gentoolkit/equery/meta.py | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py index e2d2124..d3342cd 100644 --- a/pym/gentoolkit/equery/meta.py +++ b/pym/gentoolkit/equery/meta.py @@ -373,12 +373,13 @@ def call_format_functions(best_match, matches): useflags = format_useflags(best_match.metadata.use()) print_sequence(format_list(useflags)) - _license = best_match.environment([LICENSE]) - if QUERY_OPTS[license]: - _license = format_list(_license) - else: - _license = format_list(_license, License: , * 13) - print_sequence(_license) + if QUERY_OPTS[license] or not got_opts: + _license = best_match.environment([LICENSE]) + if QUERY_OPTS[license]: + _license = format_list(_license) + else: + _license = format_list(_license, License: , * 13) + print_sequence(_license) if QUERY_OPTS[stablereq]: # Get {Package 'dev-libs/glib-2.20.5': [u'ia64', u'm68k', ...], ...}
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 39c99972049624c2504358c8455680da6acaee08 Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Mon Mar 24 06:32:53 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Mon Mar 24 06:32:53 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=39c99972 Moved option and config parsing into settings module --- pym/gentoolkit/revdep_rebuild/collect.py | 34 + pym/gentoolkit/revdep_rebuild/rebuild.py | 83 +--- pym/gentoolkit/revdep_rebuild/settings.py | 121 ++ 3 files changed, 123 insertions(+), 115 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/collect.py b/pym/gentoolkit/revdep_rebuild/collect.py index 039dc76..2a431cb 100644 --- a/pym/gentoolkit/revdep_rebuild/collect.py +++ b/pym/gentoolkit/revdep_rebuild/collect.py @@ -12,6 +12,7 @@ import sys import portage from portage.output import blue, yellow +from .settings import parse_revdep_config if sys.hexversion 0x300: @@ -87,39 +88,6 @@ def prepare_search_dirs(logger, settings): return (bin_dirs, lib_dirs) -def parse_revdep_config(revdep_confdir): - ''' Parses all files under and returns - tuple of: (masked_dirs, masked_files, search_dirs)''' - - search_dirs = set() - masked_dirs = set() - masked_files = set() - - for _file in os.listdir(revdep_confdir): - for line in open(os.path.join(revdep_confdir, _file)): - line = line.strip() - #first check for comment, we do not want to regex all lines - if not line.startswith('#'): - match = re.match('LD_LIBRARY_MASK=\\([^]+)\\', line) - if match is not None: - masks = match.group(1).split(' ') - masked_files.update(masks) - continue - match = re.match('SEARCH_DIRS_MASK=\\([^]+)\\', line) - if match is not None: - searches = match.group(1).split(' ') - for search in searches: - masked_dirs.update(glob.glob(search)) - continue - match = re.match('SEARCH_DIRS=\\([^]+)\\', line) - if match is not None: - searches = match.group(1).split() - for search in searches: - search_dirs.update(glob.glob(search)) - continue - - return (masked_dirs, masked_files, search_dirs) - def collect_libraries_from_dir(dirs, mask, logger): ''' Collects all libraries from specified list of directories. diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index 314fb1f..9d5bf9b 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -18,7 +18,6 @@ from __future__ import print_function import os import sys -import getopt import logging import subprocess import time @@ -30,7 +29,7 @@ from portage.output import bold, red, blue, yellow, nocolor from .analyse import analyse from .cache import check_temp_files, read_cache from .assign import get_slotted_cps -from .settings import DEFAULTS +from .settings import DEFAULTS, parse_options from .stuff import filter_masked from . import __version__ @@ -43,39 +42,6 @@ __productname__ = revdep-ng # functions -def print_usage(): - Outputs the help message - print( APP_NAME + ': (' + VERSION +')') - print() - print('This is free software; see the source for copying conditions.') - print() - print('Usage: ' + APP_NAME + ' [OPTIONS] [--] [EMERGE_OPTIONS]') - print() - print('Broken reverse dependency rebuilder, python implementation.') - print() - print('Available options:') - print(''' - -C, --nocolor Turn off colored output - -d, --debug Print debug informations - -e, --exact Emerge based on exact package version - -h, --helpPrint this usage - -i, --ignore Ignore temporary files from previous runs -(also won't create any) - -L, --library NAMEUnconditionally emerge existing packages that use - --library=NAMEthe library with NAME. NAME can be a full or partial -library name - -l, --no-ld-path Do not set LD_LIBRARY_PATH - -o, --no-orderDo not check the build order -(Saves time, but may cause breakage.) - -p, --pretend Do a trial run without actually emerging
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: 4f2ad629e4802598878f5bc674462de23fcea51b Author: Slawek Lis slis AT gentoo DOT org AuthorDate: Mon Mar 24 07:14:57 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Mon Mar 24 07:14:57 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=4f2ad629 parsing revdep config refactor, added environment config read (as sugggested here: https://bugs.gentoo.org/show_bug.cgi?id=504654#c28) --- pym/gentoolkit/revdep_rebuild/settings.py | 33 --- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py index 057147c..7909aa6 100644 --- a/pym/gentoolkit/revdep_rebuild/settings.py +++ b/pym/gentoolkit/revdep_rebuild/settings.py @@ -130,13 +130,24 @@ def parse_options(): return settings +def _parse_dirs_to_set(dir_str): + '''Changes space-delimited directory list into set with them + ''' + _ret = set() + for search in dir_str.split(): + if search == '-*': + break + _ret.update(glob.glob(search)) + return _ret + + def parse_revdep_config(revdep_confdir): ''' Parses all files under and returns tuple of: (masked_dirs, masked_files, search_dirs)''' - search_dirs = set() - masked_dirs = set() - masked_files = set() + search_dirs = os.environ.get('SEARCH_DIRS', '') + masked_dirs = os.environ.get('SEARCH_DIRS_MASK', '') + masked_files = os.environ.get('LD_LIBRARY_MASK', '') for _file in os.listdir(revdep_confdir): for line in open(os.path.join(revdep_confdir, _file)): @@ -145,22 +156,20 @@ def parse_revdep_config(revdep_confdir): if not line.startswith('#'): match = re.match('LD_LIBRARY_MASK=\\([^]+)\\', line) if match is not None: - masks = match.group(1).split(' ') - masked_files.update(masks) + masked_files += ' ' + match.group(1) continue match = re.match('SEARCH_DIRS_MASK=\\([^]+)\\', line) if match is not None: - searches = match.group(1).split(' ') - for search in searches: - masked_dirs.update(glob.glob(search)) + masked_dirs += ' ' + match.group(1) continue match = re.match('SEARCH_DIRS=\\([^]+)\\', line) if match is not None: - searches = match.group(1).split() - for search in searches: - search_dirs.update(glob.glob(search)) + search_dirs += ' ' + match.group(1) continue - print (masked_dirs, masked_files, search_dirs) + masked_files = set(masked_files.split(' ')) + masked_dirs = _parse_dirs_to_set(masked_dirs) + search_dirs = _parse_dirs_to_set(search_dirs) + return (masked_dirs, masked_files, search_dirs)
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: c5baf551987e2fb412caa396ae34f7f4341ad819 Author: slis lis.slawek AT gmail DOT com AuthorDate: Mon Mar 17 06:42:01 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Mon Mar 17 06:42:01 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=c5baf551 Fix #504654 - problem with encoding for non-ascii filenames --- pym/gentoolkit/revdep_rebuild/stuff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py index cc3da7b..7a8373d 100644 --- a/pym/gentoolkit/revdep_rebuild/stuff.py +++ b/pym/gentoolkit/revdep_rebuild/stuff.py @@ -22,7 +22,7 @@ def call_program(args): subp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = subp.communicate() stdout = stdout.decode('utf-8') - return str(stdout) + return stdout def scan(params, files, max_args, logger):
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: ae20dbd7f2ef2810d3150e870ece6f5b7278f676 Author: slis lis.slawek AT gmail DOT com AuthorDate: Mon Mar 17 06:48:19 2014 + Commit: Slawek Lis slis AT gentoo DOT org CommitDate: Mon Mar 17 06:48:19 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=ae20dbd7 Fix for non-existing libraries version (https://bugs.gentoo.org/show_bug.cgi?id=504654#c5) --- pym/gentoolkit/revdep_rebuild/analyse.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index d7b210b..bd1b6b7 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -185,7 +185,11 @@ class LibCheck(object): scanned_files = self.scanned_files found_libs = {} for bits in self.searchbits: - scanned = scanned_files[bits] + try: + scanned = scanned_files[bits] + except KeyError: + self.logger.debug('There are no %s-bit libraries'%bits) + continue self.logger.debug(self.smsg % bits) self.setlibs(sorted(scanned), bits) for soname, filepaths in scanned.items():
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: e566d68dd4880a5bb6cfd2c8945f4eb23b40e8f3 Author: Paul Varner fuzzyray AT gentoo DOT org AuthorDate: Tue Mar 11 21:22:41 2014 + Commit: Paul Varner fuzzyray AT gentoo DOT org CommitDate: Tue Mar 11 21:22:41 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=e566d68d Remove development version warning --- pym/gentoolkit/revdep_rebuild/rebuild.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index 0725c7c..314fb1f 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -220,10 +220,7 @@ def main(settings=None, logger=None): and settings['IS_DEV'] \ and not settings['NO_PRETEND']: logger.warn(blue(' * ') + - yellow('This is a development version, ' - 'so it may not work correctly')) - logger.warn(blue(' * ') + - yellow('Adding --pretend to portage options anyway')) + yellow('Adding --pretend to portage options')) logger.info(blue(' * ') + 'If you\'re sure, you can add --no-pretend to revdep options') settings['PRETEND'] = True
[gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/
commit: c6286bab8c4e96a7e54e05ab26244ca648ae9787 Author: Paul Varner fuzzyray AT gentoo DOT org AuthorDate: Tue Mar 11 21:42:52 2014 + Commit: Paul Varner fuzzyray AT gentoo DOT org CommitDate: Tue Mar 11 21:42:52 2014 + URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=c6286bab Remove unused revdep-rebuild.py --- pym/gentoolkit/revdep_rebuild/revdep-rebuild.py | 17 - 1 file changed, 17 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/revdep-rebuild.py b/pym/gentoolkit/revdep_rebuild/revdep-rebuild.py deleted file mode 100755 index 2619ee0..000 --- a/pym/gentoolkit/revdep_rebuild/revdep-rebuild.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - - -# Author: Sławomir Lis lis.sla...@gmail.com -# revdep-rebuild original author: Stanislav Brabec -# revdep-rebuild original rewrite Author: Michael A. Smith -# Current Maintainer: Paul Varner fuzzy...@gentoo.org - -# Creation date: 2010/10/17 -# License: BSD - -from rebuild import APP_NAME, VERSION, main - -if __name__ == '__main__': -# instead of revdep-rebuild.py call rebuild.py -main()