Closed Bug 414726 Opened 17 years ago Closed 17 years ago

Bugzilla::Update never updates bugzilla-update.xml if the file already exists locally

Categories

(Bugzilla :: Installation & Upgrading, defect)

3.0.3
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch, v1 (obsolete) (deleted) — Splinter Review
We were altering the modification time of the local copy to see if the file is editable. As such, our local copy was always newer than the one on landfill and so was never updated. My local copy was still pointing to 3.0.2 despite 3.0.3 is released for several weeks now. Definitely a blocker as administrators relying on this notification system would never know that a newer release exists, which can be bad if we do a security release. I just touched the file on landfill to update its modification time, and with this patch applied, my local installation was now able to detect the one on landfill as newer and finally downloaded it.
Flags: blocking3.1.3+
Flags: blocking3.0.4+
Attachment #300212 - Flags: review?(mkanat)
Comment on attachment 300212 [details] [diff] [review] patch, v1 Okay, looks fine to me. Although I don't think you have to restore the access time.
Attachment #300212 - Flags: review?(mkanat) → review+
(In reply to comment #1) > (From update of attachment 300212 [details] [diff] [review]) > Okay, looks fine to me. Although I don't think you have to restore the access > time. Maybe, but this doesn't hurt as the test is just .... a test (and so its action on the access time should be ignored). We should relnote this as this information is important for administrators.
Flags: approval3.0+
Flags: approval+
Keywords: relnote
tip: Checking in Bugzilla/Update.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Update.pm,v <-- Update.pm new revision: 1.9; previous revision: 1.8 done 3.0.3: Checking in Bugzilla/Update.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Update.pm,v <-- Update.pm new revision: 1.5.2.4; previous revision: 1.5.2.3 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
utime($atime, $mtime, $local_file) returns false, meaning that it's unable to restore the access and modification times correctly. Reopening!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch patch, v2 (deleted) — Splinter Review
It appears that utime($atime, $mtime, $local_file) returns false, meaning that apache is unable to restore the access and modification times. Consequently, bugzilla-update.xml is never updated as it always appears newer than the copy on landfill. What this fix does is to delete the local copy before downloading the new one. This way $ua->mirror will really download the new copy.
Attachment #300212 - Attachment is obsolete: true
Attachment #318996 - Flags: review?(wurblzap)
Attachment #318996 - Flags: review?(mkanat)
Comment on attachment 318996 [details] [diff] [review] patch, v2 Yeah, this will put a bit more load on the server, but the file is tiny anyway and it won't be a problem. I assume that you tested this--I'm just giving r+ by inspection.
Attachment #318996 - Flags: review?(mkanat) → review+
Attachment #318996 - Flags: review?(wurblzap)
tip: Checking in Bugzilla/Update.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Update.pm,v <-- Update.pm new revision: 1.10; previous revision: 1.9 done 3.0.3: Checking in Bugzilla/Update.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Update.pm,v <-- Update.pm new revision: 1.5.2.5; previous revision: 1.5.2.4 done
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Was relnoted in 3.0.4, removing relnote keyword.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: