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 DD88958973 for ; Thu, 21 Jan 2016 19:42:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5249821C028; Thu, 21 Jan 2016 19:42:28 +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 37E7FE0870 for ; Thu, 21 Jan 2016 19:42:27 +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 6C71D3409B7 for ; Thu, 21 Jan 2016 19:42:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 465AD10BE for ; Thu, 21 Jan 2016 19:42:22 +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: <1453404500.89539c68bed5af5a2e2abbf46e64a5dac55cbf4c.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: 89539c68bed5af5a2e2abbf46e64a5dac55cbf4c X-VCS-Branch: repoman Date: Thu, 21 Jan 2016 19:42:22 +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: f0884a46-3c3e-474c-9896-a4e1f51d2da0 X-Archives-Hash: 76a3496eb0b3522b81ac8978bf0b0aba commit: 89539c68bed5af5a2e2abbf46e64a5dac55cbf4c Author: Mike Gilbert gentoo org> AuthorDate: Thu Jan 21 18:51:16 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu Jan 21 19:28:20 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=89539c68 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)