Closed Bug 214558 Opened 22 years ago Closed 22 years ago

unnecessary output from checksetup.pl "which: no interdiff in (/usr/bin:/bin)"

Categories

(Bugzilla :: Attachments & Requests, defect)

2.17.4
defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: justdave, Assigned: john)

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

I get the following once an hour from landfill. interdiff is in /usr/local/bin, which as you can see is not in the PATH when checksetup.pl is run from cron. It shouldn't be looking for it if localconfig already has a value set for it (which it does). Date: Wed, 30 Jul 2003 21:00:42 -0700 From: root@landfill.bugzilla.org (Cron Daemon) To: root@landfill.bugzilla.org Subject: Cron <root@landfill> /etc/bugzilla/bugzilla-updater /var/www/html/bugzilla-tip HEAD X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/root> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=root> which: no interdiff in (/usr/bin:/bin)
Attached patch Patch (obsolete) — Splinter Review
This patch fixes the problem by checking if the variable exists *before* running which.
BTW: the way I reproduced it was to set $ENV{'PATH'} = '/bin:/usr/bin:.'; at the top of checksetup.pl before and after my patch. interdiff complained before and did not complain after. Oddly, this was the case even though I set interdiff in localconfig to ''.
Attached patch Patch v1.1 (obsolete) — Splinter Review
This version fixes a couple of other general things justdave noticed: if we're on Win32, we shouldn't run 'which'; and in the case of an error, the output of 'which' returns blank because 'no mysql' is on stderr, not stdout.
Attachment #128950 - Attachment is obsolete: true
Attachment #128951 - Flags: review?(justdave)
Attached patch Patch v1.2Splinter Review
After reading bug 208521 and thinking about it, the Win32 stuff in this patch would not work in cygwin nor does it provide reasonable defaults for Windows. So I have removed that part of the patch and left the error-checking and LocalVarExists() checks in.
Attachment #128951 - Attachment is obsolete: true
Attachment #128951 - Flags: review?(justdave)
Attachment #128956 - Flags: review?(justdave)
Comment on attachment 128956 [details] [diff] [review] Patch v1.2 it works
Attachment #128956 - Flags: review?(justdave) → review+
Flags: approval+
Fix checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: