Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/
Date: Tue, 04 Feb 2020 06:43:05
Message-Id: 1580798452.c4892c36eb1eebbee322796b7acfcd6874cae0c1.zmedico@gentoo
1 commit: c4892c36eb1eebbee322796b7acfcd6874cae0c1
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 4 06:26:49 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 4 06:40:52 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c4892c36
7
8 xpak: break_hardlinks: use native copyfile for cow
9
10 Enable zero-copy, sparse copy, and reflinks.
11
12 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
13
14 lib/portage/xpak.py | 5 +++--
15 1 file changed, 3 insertions(+), 2 deletions(-)
16
17 diff --git a/lib/portage/xpak.py b/lib/portage/xpak.py
18 index e11f26e6c..c708190b9 100644
19 --- a/lib/portage/xpak.py
20 +++ b/lib/portage/xpak.py
21 @@ -1,4 +1,4 @@
22 -# Copyright 2001-2014 Gentoo Foundation
23 +# Copyright 2001-2020 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26
27 @@ -33,6 +33,7 @@ from portage import normalize_path
28 from portage import _encodings
29 from portage import _unicode_decode
30 from portage import _unicode_encode
31 +from portage.util.file_copy import copyfile
32
33 def addtolist(mylist, curdir):
34 """(list, dir) --- Takes an array(list) and appends all files from dir down
35 @@ -328,7 +329,7 @@ class tbz2(object):
36
37 if break_hardlinks and self.filestat and self.filestat.st_nlink > 1:
38 tmp_fname = "%s.%d" % (self.file, os.getpid())
39 - shutil.copyfile(self.file, tmp_fname)
40 + copyfile(self.file, tmp_fname)
41 try:
42 portage.util.apply_stat_permissions(self.file, self.filestat)
43 except portage.exception.OperationNotPermitted: