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 907F11381F3 for ; Tue, 10 Sep 2013 06:36:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54183E094E; Tue, 10 Sep 2013 06:36:38 +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 7E5DAE0919 for ; Tue, 10 Sep 2013 06:36:37 +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 7E24B33EBF9 for ; Tue, 10 Sep 2013 06:36:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 6E70EE5459 for ; Tue, 10 Sep 2013 06:36:34 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1378734325.ddbb4ba7b3cadc9dd1f237fa79da058fdc201e2b.yamakuzure@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: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: ddbb4ba7b3cadc9dd1f237fa79da058fdc201e2b X-VCS-Branch: master Date: Tue, 10 Sep 2013 06:36: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: 1422752a-5389-474a-b226-a48d95238edf X-Archives-Hash: 4bd38847ef5f28622468385c62aac41a commit: ddbb4ba7b3cadc9dd1f237fa79da058fdc201e2b Author: Sven Eden gmx net> AuthorDate: Mon Sep 9 13:45:25 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Mon Sep 9 13:45:25 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=ddbb4ba7 ufed no longer tries to write out use flags if the new $Portage::ro_mode is not set to 0. --- ufed.pl.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ufed.pl.in b/ufed.pl.in index 5f10a22..a922109 100644 --- a/ufed.pl.in +++ b/ufed.pl.in @@ -128,12 +128,12 @@ sub flags_dialog { wait; if(POSIX::WIFEXITED($?)) { my $rc = POSIX::WEXITSTATUS($?); - if($rc==0) { + if( (0 == $rc) && (0 == $Portage::ro_mode) ) { open my $fh, '<&=', $oread or die "Couldn't read output.\n"; my @flags = grep { $_ ne '--*' } do { local $/; split /\n/, <$fh> }; close $fh; save_flags finalise @flags; - } elsif($rc==1) { + } elsif( 1 == $rc ) { print "Cancelled, not saving changes.\n"; } exit $rc; @@ -169,7 +169,7 @@ sub save_flags { my $makeconf_name = $Portage::used_make_conf; { 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"; + open my $makeconfold, '>', $makeconf_name . '~' or die "Couldn't open ${makeconf_name}~\n"; local $/; $_ = <$makeconf>; print $makeconfold $_;