diff options
author | 2013-09-09 15:45:25 +0200 | |
---|---|---|
committer | 2013-09-09 15:45:25 +0200 | |
commit | ddbb4ba7b3cadc9dd1f237fa79da058fdc201e2b (patch) | |
tree | 0a9f8874a194a8fae792ad09c3029c4525cbd09a /ufed.pl.in | |
parent | If the determined make.conf is not writable by the effective uid/gid, a warni... (diff) | |
download | ufed-ddbb4ba7b3cadc9dd1f237fa79da058fdc201e2b.tar.gz ufed-ddbb4ba7b3cadc9dd1f237fa79da058fdc201e2b.tar.bz2 ufed-ddbb4ba7b3cadc9dd1f237fa79da058fdc201e2b.zip |
ufed no longer tries to write out use flags if the new $Portage::ro_mode is not set to 0.
Diffstat (limited to 'ufed.pl.in')
-rw-r--r-- | ufed.pl.in | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 $_; |