Last Comment Bug 414726 - Bugzilla::Update never updates bugzilla-update.xml if the file already exists locally
: Bugzilla::Update never updates bugzilla-update.xml if the file already exists...
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Installation & Upgrading (show other bugs)
: 3.0.3
: All All
: -- critical (vote)
: Bugzilla 3.0
Assigned To: Frédéric Buclin
: default-qa
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-29 17:44 PST by Frédéric Buclin
Modified: 2008-06-30 23:58 PDT (History)
0 users
LpSolit: approval+
LpSolit: blocking3.1.3+
LpSolit: approval3.0+
LpSolit: blocking3.0.4+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch, v1 (1.50 KB, patch)
2008-01-29 17:44 PST, Frédéric Buclin
mkanat: review+
Details | Diff | Splinter Review
patch, v2 (1.82 KB, patch)
2008-05-02 03:48 PDT, Frédéric Buclin
mkanat: review+
Details | Diff | Splinter Review

Description Frédéric Buclin 2008-01-29 17:44:59 PST
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.
Comment 1 Max Kanat-Alexander 2008-01-29 17:48:17 PST
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.
Comment 2 Frédéric Buclin 2008-01-29 17:51:29 PST
(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.
Comment 3 Frédéric Buclin 2008-01-29 17:57:13 PST
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
Comment 4 Frédéric Buclin 2008-05-02 03:14:23 PDT
utime($atime, $mtime, $local_file) returns false, meaning that it's unable to restore the access and modification times correctly. Reopening!
Comment 5 Frédéric Buclin 2008-05-02 03:48:15 PDT
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.
Comment 6 Max Kanat-Alexander 2008-05-02 11:42:01 PDT
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.
Comment 7 Frédéric Buclin 2008-05-02 12:17:11 PDT
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
Comment 8 Max Kanat-Alexander 2008-06-30 23:58:50 PDT
Was relnoted in 3.0.4, removing relnote keyword.

Note You need to log in before you can comment on or make changes to this bug.