* [gentoo-commits] portage r14061 - main/trunk/pym/portage
@ 2009-08-15 7:08 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-15 7:08 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-08-15 07:08:03 +0000 (Sat, 15 Aug 2009)
New Revision: 14061
Modified:
main/trunk/pym/portage/__init__.py
Log:
Make movefile() use process.spawn() instead of getstatusoutput() when calling
MOVE_BINARY, since spawn will pass encoded file paths directly as arguments.
Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py 2009-08-15 06:48:15 UTC (rev 14060)
+++ main/trunk/pym/portage/__init__.py 2009-08-15 07:08:03 UTC (rev 14061)
@@ -7293,11 +7293,12 @@
return None
else:
#we don't yet handle special, so we need to fall back to /bin/mv
- a = commands.getstatusoutput("%s -f %s %s" % \
- (MOVE_BINARY, _shell_quote(src), _shell_quote(dest)))
- if a[0] != os.EX_OK:
+ a = process.spawn([MOVE_BINARY, '-f', src, dest], env=os.environ)
+ if a != os.EX_OK:
writemsg("!!! Failed to move special file:\n", noiselevel=-1)
- writemsg("!!! '%s' to '%s'\n" % (src, dest), noiselevel=-1)
+ writemsg("!!! '%s' to '%s'\n" % \
+ (_unicode_decode(src, encoding=encoding),
+ _unicode_decode(dest, encoding=encoding)), noiselevel=-1)
writemsg("!!! %s\n" % a, noiselevel=-1)
return None # failure
try:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-15 7:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-15 7:08 [gentoo-commits] portage r14061 - main/trunk/pym/portage Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox