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 F240F1381F3 for ; Tue, 14 May 2013 00:30:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 23F41E0918; Tue, 14 May 2013 00:30:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4912E0918 for ; Tue, 14 May 2013 00:30:24 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9F47033DF72 for ; Tue, 14 May 2013 00:30:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id F1012E5308 for ; Tue, 14 May 2013 00:30:20 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1368491405.54259007c1cb4ba0d41a19f6cb32e923c29b8b74.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/env_update.py X-VCS-Directories: pym/portage/util/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 54259007c1cb4ba0d41a19f6cb32e923c29b8b74 X-VCS-Branch: master Date: Tue, 14 May 2013 00:30:20 +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: 54c81c9c-4c71-4ed0-b306-fed4b0c2f170 X-Archives-Hash: c14f9b8a8e8f9701c326f338d44b56f5 commit: 54259007c1cb4ba0d41a19f6cb32e923c29b8b74 Author: Zac Medico gentoo org> AuthorDate: Tue May 14 00:30:05 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue May 14 00:30:05 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=54259007 env_update: ensure_dirs, encode filename --- pym/portage/util/env_update.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/portage/util/env_update.py b/pym/portage/util/env_update.py index cf95467..e9c06c5 100644 --- a/pym/portage/util/env_update.py +++ b/pym/portage/util/env_update.py @@ -1,4 +1,4 @@ -# Copyright 2010-2012 Gentoo Foundation +# Copyright 2010-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ['env_update'] @@ -210,8 +210,7 @@ def _env_update(makelinks, target_root, prev_mtimes, contents, env, # Update prelink.conf if we are prelink-enabled if prelink_capable: prelink_d = os.path.join(eroot, 'etc', 'prelink.conf.d') - if not os.path.isdir(prelink_d): - os.makedirs(prelink_d) + ensure_dirs(prelink_d) newprelink = atomic_ofstream(os.path.join(prelink_d, 'portage.conf')) newprelink.write("# prelink.conf autogenerated by env-update; make all changes to\n") newprelink.write("# contents of /etc/env.d directory\n") @@ -247,7 +246,8 @@ def _env_update(makelinks, target_root, prev_mtimes, contents, env, # point it to the new stuff until the prelink package re-installs. prelink_conf = os.path.join(eroot, 'etc', 'prelink.conf') try: - with open(prelink_conf, 'rb') as f: + with open(_unicode_encode(prelink_conf, + encoding=_encodings['fs'], errors='strict'), 'rb') as f: if f.readline() == b'# prelink.conf autogenerated by env-update; make all changes to\n': f = atomic_ofstream(prelink_conf) f.write('-c /etc/prelink.conf.d/*.conf\n')