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 E76B758973 for ; Sat, 30 Jan 2016 08:00:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8EEBC21C06D; Sat, 30 Jan 2016 08:00:13 +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 182C121C06E for ; Sat, 30 Jan 2016 08:00:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1B37E340CCF for ; Sat, 30 Jan 2016 08:00:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 73F16105C for ; Sat, 30 Jan 2016 08:00:02 +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: <1454140221.e7c06075a76b572006f3d6e83ec50001db2e1f59.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: e7c06075a76b572006f3d6e83ec50001db2e1f59 X-VCS-Branch: repoman Date: Sat, 30 Jan 2016 08:00:02 +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: 50f87103-1ec0-4cb3-b2ff-d5e340fe48a2 X-Archives-Hash: d0d758949e70cecb70206ce5963d57d3 commit: e7c06075a76b572006f3d6e83ec50001db2e1f59 Author: Mike Gilbert gentoo org> AuthorDate: Thu Jan 21 18:51:16 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Jan 30 07:50:21 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e7c06075 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)