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 30A61138262 for ; Wed, 18 May 2016 15:42:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DDD2022404E; Wed, 18 May 2016 15:42:04 +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 5A93214229 for ; Wed, 18 May 2016 15:42:04 +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 0270334092E for ; Wed, 18 May 2016 15:42:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6962296E for ; Wed, 18 May 2016 15:41:59 +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: <1463586042.44d972ef07970c5cb812aa0b061fb2235fc6b0d6.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 pym/gentoolkit/revdep_rebuild/assign.py pym/gentoolkit/revdep_rebuild/cache.py pym/gentoolkit/revdep_rebuild/rebuild.py pym/gentoolkit/revdep_rebuild/stuff.py X-VCS-Directories: pym/gentoolkit/revdep_rebuild/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 44d972ef07970c5cb812aa0b061fb2235fc6b0d6 X-VCS-Branch: master Date: Wed, 18 May 2016 15:41:59 +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: eb54ced5-70ca-4174-9583-9710f308ea75 X-Archives-Hash: 06b19abd8b73eb212ccef1333841d4ad commit: 44d972ef07970c5cb812aa0b061fb2235fc6b0d6 Author: Brian Dolbec gentoo org> AuthorDate: Wed May 18 15:40:42 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Wed May 18 15:40:42 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=44d972ef revdep-rebuild: Replace the deprecated logger.war calls with logger.warning pym/gentoolkit/revdep_rebuild/analyse.py | 6 +++--- pym/gentoolkit/revdep_rebuild/assign.py | 14 +++++++------- pym/gentoolkit/revdep_rebuild/cache.py | 2 +- pym/gentoolkit/revdep_rebuild/rebuild.py | 24 ++++++++++++------------ pym/gentoolkit/revdep_rebuild/stuff.py | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pym/gentoolkit/revdep_rebuild/analyse.py b/pym/gentoolkit/revdep_rebuild/analyse.py index b9c18c0..c9c5f71 100644 --- a/pym/gentoolkit/revdep_rebuild/analyse.py +++ b/pym/gentoolkit/revdep_rebuild/analyse.py @@ -283,7 +283,7 @@ def analyse(settings, logger, libraries=None, la_libraries=None, # when found for some reason stime = current_milli_time() - logger.warn(green(' * ') + + logger.warning(green(' * ') + bold('Collecting system binaries and libraries')) bin_dirs, lib_dirs = prepare_search_dirs(logger, settings) @@ -351,7 +351,7 @@ def analyse(settings, logger, libraries=None, la_libraries=None, scanned_files = scan_files(libs_and_bins, settings['CMD_MAX_ARGS'], logger, searchbits) - logger.warn(green(' * ') + bold('Checking dynamic linking consistency')) + logger.warning(green(' * ') + bold('Checking dynamic linking consistency')) logger.debug( '\tanalyse(), Searching for %i libs, bins within %i libraries and links' % (len(libs_and_bins), len(libraries)+len(libraries_links)) @@ -365,7 +365,7 @@ def analyse(settings, logger, libraries=None, la_libraries=None, libraries.union(libraries_links), _libs_to_check, logger) broken_pathes += broken_la - logger.warn(green(' * ') + bold('Assign files to packages')) + logger.warning(green(' * ') + bold('Assign files to packages')) return assign_packages(broken_pathes, logger, settings) diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py index 8d819d6..00dda6e 100644 --- a/pym/gentoolkit/revdep_rebuild/assign.py +++ b/pym/gentoolkit/revdep_rebuild/assign.py @@ -52,8 +52,8 @@ def assign_packages(broken, logger, settings): logger.info('\t' + green('* ') + m + ' -> ' + bold(found)) except Exception as e: - logger.warn(red(' !! Failed to read ' + f)) - logger.warn(red(' !! Error was:' + str(e))) + logger.warning(red(' !! Failed to read ' + f)) + logger.warning(red(' !! Error was:' + str(e))) broken_filenames = set(broken) orphaned = broken_filenames.difference(assigned_filenames) @@ -76,7 +76,7 @@ def get_best_match(cpv, cp, logger): """ slot = portage.db[portage.root]["vartree"].dbapi.aux_get(cpv, ["SLOT"])[0] - logger.warn('\t%s "%s" %s.' % (yellow('* Warning:'), cpv,bold('ebuild not found.'))) + logger.warning('\t%s "%s" %s.' % (yellow('* Warning:'), cpv,bold('ebuild not found.'))) logger.debug('\tget_best_match(); Looking for %s:%s' %(cp, slot)) try: match = portdb.match('%s:%s' %(cp, slot)) @@ -84,12 +84,12 @@ def get_best_match(cpv, cp, logger): match = None if not match: - logger.warn('\t' + red('!!') + ' ' + yellow( + logger.warning('\t' + red('!!') + ' ' + yellow( 'Could not find ebuild for %s:%s' %(cp, slot))) slot = [''] match = portdb.match(cp) if not match: - logger.warn('\t' + red('!!') + ' ' + + logger.warning('\t' + red('!!') + ' ' + yellow('Could not find ebuild for ' + cp)) return match, slot @@ -104,7 +104,7 @@ def get_slotted_cps(cpvs, logger): for cpv in cpvs: parts = catpkgsplit(cpv) if not parts: - logger.warn(('\t' + red("Failed to split the following pkg: " + logger.warning(('\t' + red("Failed to split the following pkg: " "%s, not a valid cat/pkg-ver" %cpv))) continue @@ -114,7 +114,7 @@ def get_slotted_cps(cpvs, logger): except KeyError: match, slot = get_best_match(cpv, cp, logger) if not match: - logger.warn('\t' + red("Installed package: " + logger.warning('\t' + red("Installed package: " "%s is no longer available" %cp)) continue diff --git a/pym/gentoolkit/revdep_rebuild/cache.py b/pym/gentoolkit/revdep_rebuild/cache.py index 36f0f72..6d1a1a3 100644 --- a/pym/gentoolkit/revdep_rebuild/cache.py +++ b/pym/gentoolkit/revdep_rebuild/cache.py @@ -66,7 +66,7 @@ def save_cache(logger, to_save={}, temp_path=DEFAULTS['DEFAULT_TMP_DIR']): _file.write(line + '\n') _file.close() except Exception as ex: - logger.warn('\t' + red('Could not save cache: %s' %str(ex))) + logger.warning('\t' + red('Could not save cache: %s' %str(ex))) diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py index fc57888..5408298 100644 --- a/pym/gentoolkit/revdep_rebuild/rebuild.py +++ b/pym/gentoolkit/revdep_rebuild/rebuild.py @@ -82,10 +82,10 @@ def rebuild(logger, assigned, settings): args += ' --color n' if len(emerge_command) == 0: - logger.warn(bold('\nThere is nothing to emerge. Exiting.')) + logger.warning(bold('\nThere is nothing to emerge. Exiting.')) return 0 - logger.warn(yellow( + logger.warning(yellow( '\nemerge') + args + ' --oneshot --complete-graph=y ' + bold(emerge_command)) @@ -119,19 +119,19 @@ def main(settings=None, logger=None): if not settings['stdout'].isatty() or settings['nocolor']: nocolor() - logger.warn(blue(' * ') + + logger.warning(blue(' * ') + yellow('This is the new python coded version')) - logger.warn(blue(' * ') + + logger.warning(blue(' * ') + yellow('Please report any bugs found using it.')) - logger.warn(blue(' * ') + + logger.warning(blue(' * ') + yellow('The original revdep-rebuild script is ' 'installed as revdep-rebuild.sh')) - logger.warn(blue(' * ') + + logger.warning(blue(' * ') + yellow('Please file bugs at: ' 'https://bugs.gentoo.org/')) if os.getuid() != 0 and not settings['PRETEND']: - logger.warn(blue(' * ') + + logger.warning(blue(' * ') + yellow('You are not root, adding --pretend to portage options')) settings['PRETEND'] = True @@ -153,20 +153,20 @@ def main(settings=None, logger=None): assigned, orphaned = analyse(settings, logger, _libs_to_check=_libs_to_check) if not assigned and not orphaned: - logger.warn('\n' + bold('Your system is consistent')) + logger.warning('\n' + bold('Your system is consistent')) # return the correct exit code return 0 elif orphaned: # blank line for beter visibility of the following lines - logger.warn('') + logger.warning('') if settings['library']: - logger.warn(red(' !!! Dependant orphaned files: ') + + logger.warning(red(' !!! Dependant orphaned files: ') + bold('No installed package was found for the following:')) else: - logger.warn(red(' !!! Broken orphaned files: ') + + logger.warning(red(' !!! Broken orphaned files: ') + bold('No installed package was found for the following:')) for filename in orphaned: - logger.warn(red('\t* ') + filename) + logger.warning(red('\t* ') + filename) success = rebuild(logger, assigned, settings) logger.debug("rebuild return code = %i" %success) diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py index 7a8373d..3b0a980 100644 --- a/pym/gentoolkit/revdep_rebuild/stuff.py +++ b/pym/gentoolkit/revdep_rebuild/stuff.py @@ -81,7 +81,7 @@ def filter_masked(assigned, logger): def is_masked(ebuild): if get_masking_status(ebuild): - logger.warn(' !!! ' + red('All ebuilds that could satisfy: ') + + logger.warning(' !!! ' + red('All ebuilds that could satisfy: ') + green(ebuild) + red(' have been masked')) return True return False