From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/
Date: Mon, 19 Aug 2019 03:41:20 +0000 (UTC) [thread overview]
Message-ID: <1566186003.1bc0206dc67c40cabdef63dd18ec3fe499c4e6eb.zmedico@gentoo> (raw)
commit: 1bc0206dc67c40cabdef63dd18ec3fe499c4e6eb
Author: cvkbtzx <cvkbtzx <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Sun Sep 16 13:51:04 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug 19 03:40:03 2019 +0000
URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=1bc0206d
revdep-rebuild: Fix pass_through_options to handle args containing spaces
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
pym/gentoolkit/revdep_rebuild/rebuild.py | 21 ++++++++++-----------
pym/gentoolkit/revdep_rebuild/settings.py | 4 ++--
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/pym/gentoolkit/revdep_rebuild/rebuild.py b/pym/gentoolkit/revdep_rebuild/rebuild.py
index 5408298..3f152e7 100644
--- a/pym/gentoolkit/revdep_rebuild/rebuild.py
+++ b/pym/gentoolkit/revdep_rebuild/rebuild.py
@@ -65,34 +65,33 @@ def init_logger(settings):
def rebuild(logger, assigned, settings):
"""rebuilds the assigned pkgs"""
- args = settings['pass_through_options']
+ args = list(settings['pass_through_options'])
if settings['EXACT']:
_assigned = filter_masked(assigned, logger)
- emerge_command = '=' + ' ='.join(_assigned)
+ emerge_command = ['='+a for a in _assigned]
else:
_assigned = get_slotted_cps(assigned, logger)
- emerge_command = ' '.join(_assigned)
+ emerge_command = [a for a in _assigned]
if settings['PRETEND']:
- args += ' --pretend'
+ args.append('--pretend')
if settings['VERBOSITY'] >= 2:
- args += ' --verbose'
+ args.append('--verbose')
elif settings['VERBOSITY'] < 1:
- args += ' --quiet'
+ args.append('--quiet')
if settings['nocolor']:
- args += ' --color n'
+ args.extend(['--color', 'n'])
if len(emerge_command) == 0:
logger.warning(bold('\nThere is nothing to emerge. Exiting.'))
return 0
logger.warning(yellow(
- '\nemerge') + args +
+ '\nemerge') + ' ' + ' '.join(args) +
' --oneshot --complete-graph=y ' +
- bold(emerge_command))
+ bold(' '.join(emerge_command)))
stime = current_milli_time()
- _args = 'emerge ' + args + ' --oneshot --complete-graph=y ' + emerge_command
- _args = _args.split()
+ _args = ['emerge'] + args + ['--oneshot', '--complete-graph=y'] + emerge_command
success = subprocess.call(_args)
ftime = current_milli_time()
logger.debug("\trebuild(); emerge call for %d ebuilds took: %s seconds"
diff --git a/pym/gentoolkit/revdep_rebuild/settings.py b/pym/gentoolkit/revdep_rebuild/settings.py
index 81e9c64..b0a9f61 100644
--- a/pym/gentoolkit/revdep_rebuild/settings.py
+++ b/pym/gentoolkit/revdep_rebuild/settings.py
@@ -46,7 +46,7 @@ DEFAULTS = {
'debug': False,
'no-ld-path': False,
'no-order': False,
- 'pass_through_options': '',
+ 'pass_through_options': [],
'stdout': sys.stdout,
'stdin': sys.stdin,
'stderr': sys.stderr
@@ -121,7 +121,7 @@ def parse_options():
if args.library:
settings['library'].update(set(args.library))
settings['USE_TMP_FILES'] = not args.ignore
- settings['pass_through_options'] = " " + " ".join(args.portage_options)
+ settings['pass_through_options'].extend(args.portage_options)
return settings
next reply other threads:[~2019-08-19 3:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 3:41 Zac Medico [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
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: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=1566186003.1bc0206dc67c40cabdef63dd18ec3fe499c4e6eb.zmedico@gentoo \
--to=zmedico@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