Note: There are a few cases of duplicates in user autocompletion which are being worked on.

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

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Installation & Upgrading
--
critical
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

3.0.3
Bugzilla 3.0
Bug Flags:
approval +
blocking3.1.3 +
approval3.0 +
blocking3.0.4 +

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.82 KB, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Assignee)

Description

10 years ago
Created attachment 300212 [details] [diff] [review]
patch, v1

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 1

10 years ago
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+
(Assignee)

Comment 2

10 years ago
(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
(Assignee)

Comment 3

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

9 years ago
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 → ---
(Assignee)

Comment 5

9 years ago
Created attachment 318996 [details] [diff] [review]
patch, v2

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 6

9 years ago
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+
(Assignee)

Updated

9 years ago
Attachment #318996 - Flags: review?(wurblzap)
(Assignee)

Comment 7

9 years ago
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
Last Resolved: 10 years ago9 years ago
Resolution: --- → FIXED

Comment 8

9 years ago
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.