aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-20 12:07:31 -0800
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-20 12:07:31 -0800
commit4983a7bcf0dccc254376462ce3bd00df05306563 (patch)
tree6d102180885056fe0b4c5b98d290c07238fea733 /Bugzilla
parentdd9c365233b1418e44b2add9df0c521577a0c181 (diff)
downloadbugs-4983a7bcf0dccc254376462ce3bd00df05306563.tar
bugs-4983a7bcf0dccc254376462ce3bd00df05306563.tar.gz
bugs-4983a7bcf0dccc254376462ce3bd00df05306563.tar.bz2
bugs-4983a7bcf0dccc254376462ce3bd00df05306563.tar.xz
bugs-4983a7bcf0dccc254376462ce3bd00df05306563.zip
Bug 546871: Make checksetup.pl not try to fix the permissions of
bugzilla-update.xml, to avoid warnings. r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Install/Filesystem.pm1
-rw-r--r--Bugzilla/Update.pm17
2 files changed, 6 insertions, 12 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index 44c34718e..4dc8a484d 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -137,7 +137,6 @@ sub FILESYSTEM {
'docs/style.css' => { perms => $ws_readable },
'docs/*/rel_notes.txt' => { perms => $ws_readable },
'docs/*/README.docs' => { perms => $owner_readable },
- "$datadir/bugzilla-update.xml" => { perms => $ws_writeable },
"$datadir/params" => { perms => $ws_writeable },
"$datadir/old-params.txt" => { perms => $owner_readable },
"$extensionsdir/create.pl" => { perms => $owner_executable },
diff --git a/Bugzilla/Update.pm b/Bugzilla/Update.pm
index 292ab626e..489756406 100644
--- a/Bugzilla/Update.pm
+++ b/Bugzilla/Update.pm
@@ -34,18 +34,13 @@ sub get_notifications {
# Update the local XML file if this one doesn't exist or if
# the last modification time (stat[9]) is older than TIME_INTERVAL.
if (!-e $local_file || (time() - (stat($local_file))[9] > TIME_INTERVAL)) {
- # Are we sure we didn't try to refresh this file already
- # but we failed because we cannot modify its timestamp?
- my $can_alter = (-e $local_file) ? utime(undef, undef, $local_file) : 1;
- if ($can_alter) {
- unlink $local_file; # Make sure the old copy is away.
- my $error = _synchronize_data();
- # If an error is returned, leave now.
- return $error if $error;
- }
- else {
- return {'error' => 'no_update', 'xml_file' => $local_file};
+ unlink $local_file; # Make sure the old copy is away.
+ if (-e $local_file) {
+ return { error => 'no_update', xml_file => $local_file };
}
+ my $error = _synchronize_data();
+ # If an error is returned, leave now.
+ return $error if $error;
}
# If we cannot access the local XML file, ignore it.