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 E853758973 for ; Sun, 31 Jan 2016 20:03:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 93DC121C175; Sun, 31 Jan 2016 20:03:43 +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 03D9621C175 for ; Sun, 31 Jan 2016 20:03:37 +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 1A731340D01 for ; Sun, 31 Jan 2016 20:03:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5E3FF1144 for ; Sun, 31 Jan 2016 20:03:32 +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: <1454185524.014910ba6d7db13763d5de1bf1a4f7d9eb59d38c.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: 014910ba6d7db13763d5de1bf1a4f7d9eb59d38c X-VCS-Branch: repoman Date: Sun, 31 Jan 2016 20:03:32 +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: 576e4109-0b75-430c-991c-7164cd86724e X-Archives-Hash: 245f93e2a84dfd4c1b68a120f5fdb7d7 commit: 014910ba6d7db13763d5de1bf1a4f7d9eb59d38c Author: Mike Gilbert gentoo org> AuthorDate: Thu Jan 21 18:51:16 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Jan 30 20:25:24 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=014910ba 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)