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 B37221382C5 for ; Sun, 4 Mar 2018 02:38:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3B98E08DD; Sun, 4 Mar 2018 02:38:55 +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 D055FE08DD for ; Sun, 4 Mar 2018 02:38:54 +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 B429E335C0A for ; Sun, 4 Mar 2018 02:38:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 44F88231 for ; Sun, 4 Mar 2018 02:38:52 +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: <1520131029.ad72389ed8067d740dd0e3f975a33f0c1cbfd8b5.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/movefile.py X-VCS-Directories: pym/portage/util/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ad72389ed8067d740dd0e3f975a33f0c1cbfd8b5 X-VCS-Branch: master Date: Sun, 4 Mar 2018 02:38:52 +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-Archives-Salt: 651b604b-eba3-4d72-b7bd-416999c26641 X-Archives-Hash: 72ecde315ad11af803134636276ecc3a commit: ad72389ed8067d740dd0e3f975a33f0c1cbfd8b5 Author: Arfrever Frehtes Taifersar Arahesis Apache Org> AuthorDate: Sun Mar 4 02:25:34 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Mar 4 02:37:09 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ad72389e movefile: Fix preservation of security.capability xattr Call _apply_stat() before copying extended attributes, because _apply_stat() calls os.chown() which results in deleting security.capability extended attribute. Bug: https://bugs.gentoo.org/649418 pym/portage/util/movefile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/util/movefile.py b/pym/portage/util/movefile.py index 37c809eb5..5477a669f 100644 --- a/pym/portage/util/movefile.py +++ b/pym/portage/util/movefile.py @@ -1,4 +1,4 @@ -# Copyright 2010-2013 Gentoo Foundation +# Copyright 2010-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import absolute_import, unicode_literals @@ -272,6 +272,7 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None, errors='strict') try: # For safety copy then move it over. _copyfile(src_bytes, dest_tmp_bytes) + _apply_stat(sstat, dest_tmp_bytes) if xattr_enabled: try: _copyxattr(src_bytes, dest_tmp_bytes, @@ -286,7 +287,6 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None, for line in msg: writemsg("!!! %s\n" % (line,), noiselevel=-1) raise - _apply_stat(sstat, dest_tmp_bytes) _rename(dest_tmp_bytes, dest_bytes) _os.unlink(src_bytes) except SystemExit as e: