]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 546871: Make checksetup.pl not try to fix the permissions of
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Sat, 20 Feb 2010 20:08:38 +0000 (12:08 -0800)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Sat, 20 Feb 2010 20:08:38 +0000 (12:08 -0800)
bugzilla-update.xml, to avoid warnings.
r=LpSolit, a=LpSolit

Bugzilla/Install/Filesystem.pm
Bugzilla/Update.pm

index 44c34718e46d4cf7a9059a70746357e6a7d2d3e4..4dc8a484d240f1a14158ea16902b3af2f815a009 100644 (file)
@@ -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 },
index 292ab626e16e0d5aa73c3ad98032080064c10c7b..4897564065d6c98ba5e164f15685d656e8631566 100644 (file)
@@ -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.