public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/
Date: Wed, 18 May 2016 15:41:59 +0000 (UTC)	[thread overview]
Message-ID: <1463586042.44d972ef07970c5cb812aa0b061fb2235fc6b0d6.dolsen@gentoo> (raw)

commit:     44d972ef07970c5cb812aa0b061fb2235fc6b0d6
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed May 18 15:40:42 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> 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


             reply	other threads:[~2016-05-18 15:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 15:41 Brian Dolbec [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-06-09 19:38 Slawek Lis
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=1463586042.44d972ef07970c5cb812aa0b061fb2235fc6b0d6.dolsen@gentoo \
    --to=dolsen@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