Closed
Bug 280193
Opened 20 years ago
Closed 20 years ago
Round up places using data/ instead of $datadir
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: Wurblzap, Assigned: Wurblzap)
References
Details
Attachments
(1 file, 2 obsolete files)
|
3.57 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
There are rogue places not using Config.pm's $datadir variable.
| Assignee | ||
Comment 1•20 years ago
|
||
Replaced data/ by $datadir/. Of note: duplicates.js and template/en/default/reports/duplicates.rdf.tmpl were not fixable any way I could think of; I added FIXME code comments.
Comment 2•20 years ago
|
||
Comment on attachment 172668 [details] [diff] [review] Patch >- # If a writable data/errorlog exists, log error details there. >- if (-w "data/errorlog") { >+ # If a writable $datadir/errorlog exists, log error details there. >+ if (-w "$Bugzilla::Config::datadir/errorlog") { You should write: use Bugzilla::Config qw(:DEFAULT $datadir); and then: if (-w "$datadir/errorlog") { >- open(ERRORLOGFID, ">>data/errorlog"); >+ open(ERRORLOGFID, ">>$Bugzilla::Config::datadir/errorlog"); open(ERRORLOGFID, ">>$datadir/errorlog"); is better. >- unlink "data/versioncache"; >+ unlink "$Bugzilla::Config::datadir/versioncache"; >- unlink "data/versioncache"; >+ unlink "$Bugzilla::Config::datadir/versioncache"; >- unlink "data/versioncache"; >+ unlink "$Bugzilla::Config::datadir/versioncache"; Same remark here: unlink "$datadir/versioncache"; About duplicates.* files, you should drop them from your patch, IMHO. I don't see a way to fix the problem and it may be part of another bug.
Attachment #172668 -
Flags: review? → review-
| Assignee | ||
Comment 3•20 years ago
|
||
(In reply to comment #2) > You should write: > > use Bugzilla::Config qw(:DEFAULT $datadir); > > and then: > > if (-w "$datadir/errorlog") { Ok, this is now possible after bug 283019. Did that. > About duplicates.* files, you should drop them from your patch, IMHO. I don't > see a way to fix the problem and it may be part of another bug. Did that. It turns out that in these files, data/ is used in an URI, so $datadir doesn't even apply: the way I see it, even if $datadir changes, the URI should still use data/.
| Assignee | ||
Updated•20 years ago
|
Attachment #172668 -
Attachment is obsolete: true
Attachment #177598 -
Flags: review?(LpSolit)
| Assignee | ||
Updated•20 years ago
|
Comment 4•20 years ago
|
||
Comment on attachment 177598 [details] [diff] [review] Patch 1.2 You missed some "data/" in testserver.pl: 168: create_file('data/testgd-local.png', $image->png); 169: check_image('data/testgd-local.png', 't/testgd.png', 'GD', 'PNG'); 191: $chart->$type("data/testchart-local.$type"); 192: check_image("data/testchart-local.$type", "t/testchart.$type", 261068 12 -rwxr-xr-x 1 root root 8402 mar 16 01:19 ./testserver.pl
Attachment #177598 -
Flags: review?(LpSolit) → review-
| Assignee | ||
Comment 5•20 years ago
|
||
(In reply to comment #4) > You missed some "data/" in testserver.pl: Well, bug 275705 missed them, checked in yesterday :) New patch coming up.
| Assignee | ||
Comment 6•20 years ago
|
||
I noticed that testserver.pl didn't use any Bugzilla modules before this patch. Is there a reason for this other than it not being necessary? It still works, anyway, even now use-ing Config.pm.
| Assignee | ||
Updated•20 years ago
|
Attachment #177598 -
Attachment is obsolete: true
Attachment #177746 -
Flags: review?(LpSolit)
Comment 7•20 years ago
|
||
*** Bug 282873 has been marked as a duplicate of this bug. ***
Comment 8•20 years ago
|
||
Comment on attachment 177746 [details] [diff] [review] Patch 1.3 It sounds reasonable to me to use a configuration file, that is "Config.pm". r=LpSolit
Attachment #177746 -
Flags: review?(LpSolit) → review+
Updated•20 years ago
|
Flags: approval?
Target Milestone: --- → Bugzilla 2.20
Updated•20 years ago
|
Flags: approval? → approval+
Comment 9•20 years ago
|
||
Checking in editclassifications.cgi; /cvsroot/mozilla/webtools/bugzilla/editclassifications.cgi,v <-- editclassifications.cgi new revision: 1.10; previous revision: 1.9 done Checking in testserver.pl; /cvsroot/mozilla/webtools/bugzilla/testserver.pl,v <-- testserver.pl new revision: 1.6; previous revision: 1.5 done Checking in Bugzilla/Error.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Error.pm,v <-- Error.pm new revision: 1.13; previous revision: 1.12 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•