From dbaa4d2818e49a5c7cd0fd4f3db19d5b5b8ec32a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 7 Nov 2006 08:33:25 +0000 Subject: use 3 args in open: replace ">$file" with ">", "$file" --- urpm.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 0ca25eb0..b6de2d4b 100644 --- a/urpm.pm +++ b/urpm.pm @@ -1806,7 +1806,7 @@ this could happen if you mounted manually the directory when creating the medium #- make sure group and other do not have any access to this file, used to hide passwords. if ($medium->{list}) { my $mask = umask 077; - open my $listfh, ">$urpm->{cachedir}/partial/$medium->{list}" + open my $listfh, ">", "$urpm->{cachedir}/partial/$medium->{list}" or $error = 1, $urpm->{error}(N("unable to write list file of \"%s\"", $medium->{name})); umask $mask; print $listfh values %list; @@ -2616,7 +2616,7 @@ sub exlock_rpm_db { #- avoid putting a require on Fcntl ':flock' (which is perl and not perl-base). my ($LOCK_EX, $LOCK_NB) = (2, 4); #- lock urpmi database, but keep lock to wait for an urpmi.update to finish. - open $RPMLOCK_FILE, ">$urpm->{root}/$urpm->{statedir}/.RPMLOCK"; + open $RPMLOCK_FILE, ">", "$urpm->{root}/$urpm->{statedir}/.RPMLOCK"; flock $RPMLOCK_FILE, $LOCK_EX|$LOCK_NB or $urpm->{fatal}(7, N("urpmi database locked")); } @@ -2626,7 +2626,7 @@ sub shlock_rpm_db { my ($LOCK_SH, $LOCK_NB) = (1, 4); #- create the .LOCK file if needed (and if possible) unless (-e "$urpm->{root}/$urpm->{statedir}/.RPMLOCK") { - open $RPMLOCK_FILE, ">$urpm->{root}/$urpm->{statedir}/.RPMLOCK"; + open $RPMLOCK_FILE, ">", "$urpm->{root}/$urpm->{statedir}/.RPMLOCK"; close $RPMLOCK_FILE; } #- lock urpmi database, if the LOCK file doesn't exists no share lock. @@ -2649,7 +2649,7 @@ sub exlock_urpmi_db { #- avoid putting a require on Fcntl ':flock' (which is perl and not perl-base). my ($LOCK_EX, $LOCK_NB) = (2, 4); #- lock urpmi database, but keep lock to wait for an urpmi.update to finish. - open $LOCK_FILE, ">$urpm->{statedir}/.LOCK"; + open $LOCK_FILE, ">", "$urpm->{statedir}/.LOCK"; flock $LOCK_FILE, $LOCK_EX|$LOCK_NB or $urpm->{fatal}(7, N("urpmi database locked")); } @@ -2659,7 +2659,7 @@ sub shlock_urpmi_db { my ($LOCK_SH, $LOCK_NB) = (1, 4); #- create the .LOCK file if needed (and if possible) unless (-e "$urpm->{statedir}/.LOCK") { - open $LOCK_FILE, ">$urpm->{statedir}/.LOCK"; + open $LOCK_FILE, ">", "$urpm->{statedir}/.LOCK"; close $LOCK_FILE; } #- lock urpmi database, if the LOCK file doesn't exists no share lock. -- cgit v1.2.1