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 9285758973 for ; Thu, 21 Jan 2016 19:15:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0163221C028; Thu, 21 Jan 2016 19:15:39 +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 98C7321C028 for ; Thu, 21 Jan 2016 19:15:38 +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 6C04534082B for ; Thu, 21 Jan 2016 19:15:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E31D7CF3 for ; Thu, 21 Jan 2016 19:15:34 +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: <1453402432.188ae7b6a4d1e01f061b6516bd79fff40ce0e004.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: 188ae7b6a4d1e01f061b6516bd79fff40ce0e004 X-VCS-Branch: repoman Date: Thu, 21 Jan 2016 19:15:34 +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: c73a8d3b-7bd5-4d46-bd4d-d4f5ec0024b1 X-Archives-Hash: b4770d375f7cbd4828521e8f893f229c commit: 188ae7b6a4d1e01f061b6516bd79fff40ce0e004 Author: Mike Gilbert gentoo org> AuthorDate: Thu Jan 21 18:51:16 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Jan 21 18:53:52 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=188ae7b6 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 70c07a8..63e78b2 100644 --- a/pym/repoman/metadata.py +++ b/pym/repoman/metadata.py @@ -17,6 +17,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: @@ -141,7 +142,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)