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 AEFC3138010 for ; Tue, 23 Oct 2012 16:13:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9B4A21C006; Tue, 23 Oct 2012 16:13:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1655321C006 for ; Tue, 23 Oct 2012 16:13:31 +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 74B8933D882 for ; Tue, 23 Oct 2012 16:13:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 261D8E5446 for ; Tue, 23 Oct 2012 16:13:29 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1351008760.a6fa7fa7cb9ba8427cf9f7929d8a1340e9d62257.fuzzyray@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: ufed.pl.in X-VCS-Directories: / X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: a6fa7fa7cb9ba8427cf9f7929d8a1340e9d62257 X-VCS-Branch: master Date: Tue, 23 Oct 2012 16:13:29 +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: 9dc119f9-78cc-4a7b-886d-632799eb3fac X-Archives-Hash: 1faf345f0368613975015718fe372b71 commit: a6fa7fa7cb9ba8427cf9f7929d8a1340e9d62257 Author: Paul Varner gentoo org> AuthorDate: Tue Oct 23 16:12:40 2012 +0000 Commit: Paul Varner gentoo org> CommitDate: Tue Oct 23 16:12:40 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=a6fa7fa7 Write into correct make.conf. (Bug 434672) Patch supplied by Martin Väth --- ufed.pl.in | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ufed.pl.in b/ufed.pl.in index 06d5642..7493147 100644 --- a/ufed.pl.in +++ b/ufed.pl.in @@ -155,9 +155,11 @@ sub save_flags(@) { my (@flags) = @_; my $contents; + my $makeconf_name = '/etc/portage/make.conf'; + $makeconf_name = '/etc/make.conf' unless(-r $makeconf_name); { - open my $makeconf, '<', '/etc/make.conf' or die "Couldn't open /etc/make.conf\n"; - open my $makeconfold, '>', '/etc/make.conf.old' or die "Couldn't open /etc/make.conf.old\n"; + open my $makeconf, '<', $makeconf_name or die "Couldn't open $makeconf_name\n"; + open my $makeconfold, '>', $makeconf_name . '.old' or die "Couldn't open $makeconf_name.old\n"; local $/; $_ = <$makeconf>; print $makeconfold $_; @@ -292,11 +294,11 @@ sub save_flags(@) { die "Parse error when writing make.conf - did you modify it while ufed was running?\n" if $@; print STDERR <', '/etc/make.conf' or die "Couldn't open /etc/make.conf\n"; + open my $makeconf, '>', $makeconf_name or die "Couldn't open $makeconf_name\n"; print $makeconf $_; close $makeconf; }