commit: e8f9d69d760a772aa4bcc695d2ac655a9f89e8d9 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Thu Nov 30 20:21:56 2017 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Dec 2 21:17:41 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e8f9d69d
bin/doins.py: optimize with copyfile from portage.util.file_copy Bug: https://bugs.gentoo.org/624526 bin/doins.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/doins.py b/bin/doins.py index 13b9c5fc0..ad8f90eee 100644 --- a/bin/doins.py +++ b/bin/doins.py @@ -1,4 +1,7 @@ #!/usr/bin/python -b +# Copyright 2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# # Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -25,6 +28,7 @@ import subprocess import sys from portage.util import movefile +from portage.util.file_copy import copyfile def _warn(helper, msg): @@ -177,12 +181,7 @@ class _InsInProcessInstallRunner(object): if e.errno != errno.ENOENT: raise try: - # TODO: Consider to use portage.util.file_copy.copyfile - # introduced by - # https://gitweb.gentoo.org/proj/portage.git/commit/ - # ?id=8ab5c8835931fd9ec098dbf4c5f416eb32e4a3a4 - # after uprev. - shutil.copyfile(source, dest) + copyfile(source, dest) _set_attributes(self._parsed_options, dest) if self._copy_xattr: movefile._copyxattr(
