From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3198E58973 for ; Fri, 22 Jan 2016 20:55:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8470021C061; Fri, 22 Jan 2016 20:55:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2AC8F21C061 for ; Fri, 22 Jan 2016 20:55:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 68821340B6E for ; Fri, 22 Jan 2016 20:55:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8FD721227 for ; Fri, 22 Jan 2016 20:55:10 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1453488255.1390734ebb6c31de12e5aeef74128eb3c54febf3.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/metadata.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 1390734ebb6c31de12e5aeef74128eb3c54febf3 X-VCS-Branch: repoman Date: Fri, 22 Jan 2016 20:55:10 +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: e9608434-74bf-4c41-9203-7d8bd9c2045c X-Archives-Hash: a1bbcf2da5f163ed2e4227a31b067514 commit: 1390734ebb6c31de12e5aeef74128eb3c54febf3 Author: Mike Gilbert gentoo org> AuthorDate: Thu Jan 21 18:51:16 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Fri Jan 22 18:44:15 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1390734e metadata.py: Resolve error when moving metadata.dtd If DISTDIR and PORTDIR/metadata/dtd live on different filesystems, os.rename() will fail. Use shutil.move() instead. pym/repoman/metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/repoman/metadata.py b/pym/repoman/metadata.py index f1fa53a..e95ad41 100644 --- a/pym/repoman/metadata.py +++ b/pym/repoman/metadata.py @@ -19,6 +19,7 @@ from repoman._portage import portage from portage import exception from portage import os +from portage import shutil from portage.output import green if sys.hexversion >= 0x3000000: @@ -143,7 +144,7 @@ def fetch_metadata_dtd(metadata_dtd, repoman_settings): except portage.exception.PortageException: pass - os.rename(metadata_dtd_tmp, metadata_dtd) + shutil.move(metadata_dtd_tmp, metadata_dtd) finally: try: os.unlink(metadata_dtd_tmp)