From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0A9F5138350 for ; Tue, 4 Feb 2020 06:43:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21202E086C; Tue, 4 Feb 2020 06:43:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 02529E086C for ; Tue, 4 Feb 2020 06:43:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4D7D834E6C0 for ; Tue, 4 Feb 2020 06:43:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C69AA37 for ; Tue, 4 Feb 2020 06:43:00 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1580798452.c4892c36eb1eebbee322796b7acfcd6874cae0c1.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/xpak.py X-VCS-Directories: lib/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c4892c36eb1eebbee322796b7acfcd6874cae0c1 X-VCS-Branch: master Date: Tue, 4 Feb 2020 06:43:00 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7883823b-4e5a-44a8-8f0d-54a4d4975e64 X-Archives-Hash: 06464744d569791c5a37f29d86df2e20 commit: c4892c36eb1eebbee322796b7acfcd6874cae0c1 Author: Zac Medico gentoo org> AuthorDate: Tue Feb 4 06:26:49 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Feb 4 06:40:52 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c4892c36 xpak: break_hardlinks: use native copyfile for cow Enable zero-copy, sparse copy, and reflinks. Signed-off-by: Zac Medico gentoo.org> lib/portage/xpak.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/portage/xpak.py b/lib/portage/xpak.py index e11f26e6c..c708190b9 100644 --- a/lib/portage/xpak.py +++ b/lib/portage/xpak.py @@ -1,4 +1,4 @@ -# Copyright 2001-2014 Gentoo Foundation +# Copyright 2001-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 @@ -33,6 +33,7 @@ from portage import normalize_path from portage import _encodings from portage import _unicode_decode from portage import _unicode_encode +from portage.util.file_copy import copyfile def addtolist(mylist, curdir): """(list, dir) --- Takes an array(list) and appends all files from dir down @@ -328,7 +329,7 @@ class tbz2(object): if break_hardlinks and self.filestat and self.filestat.st_nlink > 1: tmp_fname = "%s.%d" % (self.file, os.getpid()) - shutil.copyfile(self.file, tmp_fname) + copyfile(self.file, tmp_fname) try: portage.util.apply_stat_permissions(self.file, self.filestat) except portage.exception.OperationNotPermitted: