Shell script errors during build process

RESOLVED DUPLICATE of bug 1241907

Status

()

Firefox for Android
Testing
RESOLVED DUPLICATE of bug 1241907
2 years ago
2 years ago

People

(Reporter: kats, Assigned: gbrown)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Created attachment 8712776 [details]
Build log

While building fennec on OS X I see stuff like this peppered in the final stages of the build output:

63:12.76 error: device '(null)' not found
63:12.76 /bin/sh: line 0: [: -gt: unary operator expected
63:12.85 error: device '(null)' not found
63:12.86 /bin/sh: line 0: [: -gt: unary operator expected

Full build log attached. Total guess here but I think it might be a regression from bug 1234799 which added this code:

+sdk_level=$(shell $(ADB) shell getprop ro.build.version.sdk)
+permissions-required=$(shell if [ $(sdk_level) -gt 22 ] ; then echo yes ; else echo no ; fi)

and if a device isn't plugged in then the first shell command spits out an error and sdk_level is empty.
I see the same shell errors in a recent try push that I did for the fennec build job. So it's not just me, this probably happens any time a build is done without a device plugged in.
(Assignee)

Comment 2

2 years ago
I'm surprised that code is running during a build, but I think you may be right.
Assignee: nobody → gbrown
(Assignee)

Comment 3

2 years ago
Created attachment 8712838 [details] [diff] [review]
move sdk level evaluation into install target

This should avoid the adb call except when it's needed (in the install target).
Attachment #8712838 - Flags: review?(bugmail.mozilla)
Comment on attachment 8712838 [details] [diff] [review]
move sdk level evaluation into install target

Review of attachment 8712838 [details] [diff] [review]:
-----------------------------------------------------------------

Even with this patch applied I'm seeing the same output. If I comment out the if condition entirely the output goes away, so it's not a weird build artifact or anything. For some reason the makefile is evaluating that if expression even if I'm not running the install target.
Attachment #8712838 - Flags: review?(bugmail.mozilla) → review-
(Assignee)

Comment 5

2 years ago
Oops -- I changed the message just enough to get past my grep!
(Assignee)

Comment 6

2 years ago
Changes in bug 1241907 will eliminate the troublesome code.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1241907
You need to log in before you can comment on or make changes to this bug.