Closed Bug 369466 Opened 19 years ago Closed 18 years ago

tr_install.pl fails with "Can't find file: localconfig"

Categories

(Testopia :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: galiel, Assigned: gregaryh)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 Build Identifier: testopia-1.1.3 I have an rpm distribution of bugzilla that is installed in /usr/share/bugzilla and the localconfig file is in /etc/bugzilla. the install procedure (tr_install.pl) searches for the localconfig file only in the local directory (bugzilla's root directory). Reproducible: Always Steps to Reproduce: 1. $ cd /usr/share/bugzilla 2. $ perl tr_install.pl Actual Results: Can't find file: localconfig Bugzilla is not installed in this directory. Can't continue. Install failed. See details above. Expected Results: install success check should be done to see if the localconfig file is in any other (reasonable) place before quitting... here is a patch I wrote: diff tr_install.pl~ tr_install.pl 39,40c39,44 < if (! -e "localconfig") { < DieWithStyle("Can't find file: localconfig\nBugzilla is not installed in this directory.\n". --- > if (-e "localconfig") { > do 'localconfig'; > }elsif ( -e "/etc/bugzilla/localconfig" && -e "Bugzilla") { > do '/etc/bugzilla/localconfig'; > }else{ > DieWithStyle("Can't find file: ./localconfig or /etc/bugzilla/localconfig\nBugzilla is not installed in this directory or not at all...\n".
in tr_install.pl, check for existence of localconfig also in /etc/bugzilla
I am curious. It seems that checksetup finds the location of localconfig from Config.pm with this: # constant paths our $libpath = '.'; ... $localconfig = "$libpath/localconfig"; Does your rpm bugzilla have a different location specified here? If so, we should really be using Config.pm to tell us where localconfig is, since it could be anywhere. This way you only have to modify the location in one place.
if I understand you right, what you mean is for tr_install.pl to: 1. check for existence of ./Bugzilla/config.pm (quit if not found) 2. invoke config.pm 3. do '$localconfig'
I believe that is correct. That appears to be the way checksetup does it.
Attachment #254142 - Attachment is obsolete: true
Attachment #256602 - Flags: review?
Comment on attachment 256602 [details] [diff] [review] patchd to find localconfig's location from Bugzilla::Config This looks good. However this patch no longer applies cleanly because of bug 370120. It looks as though this fix would take care of that bug as well however. Can you rewrite the patch for the tip? You can checkout from cvs using the Testopia module or using the cvs_update.sh from the testopia/scripts directory. You may want to do so on a test installation though since the tip is not the most stable.
Attachment #256602 - Flags: review? → review-
We have now removed the installation out of tr_install and into Bugzilla 3.0 hooks. This makes this moot as it will run as part of checksetup.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: