The default bug view has changed. See this FAQ.

client.mk should fail if MOZCONFIG is specified but points to a nonexistent file

RESOLVED FIXED in mozilla7

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: int3, Assigned: int3)

Tracking

unspecified
mozilla7
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-bs)

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20100101 Firefox/5.0
Build Identifier: 

I spent a good deal of time trying to figure out why my builds weren't working as expected, when I realized that my MOZCONFIG environment variable was actually pointing to a nonexistent file, and the build was just using its default options. I feel that the build system should highlight this error instead of defaulting silently.

Reproducible: Always
(Assignee)

Comment 1

6 years ago
Created attachment 540980 [details] [diff] [review]
Fix for the issue described.
Attachment #540980 - Flags: review?(khuey)
(Assignee)

Updated

6 years ago
Hardware: x86 → All
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 540980 [details] [diff] [review]
Fix for the issue described.

>+  if [ -n "$_config" ] && ! [ -f "$_config" ]; then

This should be ||, no?
(Assignee)

Comment 3

6 years ago
Nope. If _config is not defined, then we should look for the mozconfig file in the default places like ~/.mozconfig. But if it is defined _and_ points to a file that doesn't exist, then we should throw an error.
My bad, I read another ! in there because that's what I expected.
Attachment #540980 - Flags: review?(khuey) → review+
http://hg.mozilla.org/projects/build-system/rev/8625f655aeec
Whiteboard: fixed-in-bs
Assignee: nobody → jezreel
Status: NEW → ASSIGNED
http://hg.mozilla.org/mozilla-central/rev/8625f655aeec
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla7

Comment 7

6 years ago
this broke my pymake builds of Thunderbird. For those builds, I set MOZCONFIG to /c/builds/<tree>/mozconfig, which was working earlier.
Does it not work to set MOZCONFIG=c:/builds/<tree>/mozconfig?

Comment 9

6 years ago
(In reply to comment #8)
> Does it not work to set MOZCONFIG=c:/builds/<tree>/mozconfig?

No, it fails the same way:

g --disable-optimize --enable-chrome-format=jar --enable-application=../mail --d
isable-official-branding --with-branding=../mail/branding/nightly --cache-file=.
././config.cache --srcdir=../../mozilla
../../mozilla/./build/autoconf/mozconfig2configure: line 118: Specified MOZCONFI
G "../.mozconfig" does not exist!: No such file or directory
configure: error: ../../mozilla/configure failed for mozilla

It's odd that it's looking for ../.mozconfig - maybe it's an issue that Thunderbird builds out of <tree>/mozilla
Also breaks for me using a relative configure i.e. invoking ../configure with my mozconfig living in my srcdir so not actually specified in $MOZCONFIG.
Strange, running MOZCONFIG=/c/Users/Sid/mozilla/comm-central/.mozconfig-opt ../configure works fine for me with an updated mozilla-central.
So ... do we need to back this out our not?
You need to log in before you can comment on or make changes to this bug.