Build bustage: TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'.
Categories
(Toolkit :: Application Update, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox74 | --- | unaffected |
firefox75 | --- | unaffected |
firefox76 | --- | fixed |
People
(Reporter: RyanVM, Assigned: bytesized)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Confirmed via local bisection that this was a regression from bug 1568994. If it matters, I build with the updater disabled.
build/application.ini.stub
build/application.ini.h.stub
toolkit/components/telemetry/TelemetryHistogramData.inc.stub
Traceback (most recent call last):
File "C:\mozilla-build\python3\Lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\mozilla-build\python3\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Users\Ryan\repos\mozilla\python\mozbuild\mozbuild\action\file_generate.py", line 124, in <module>
sys.exit(main(sys.argv[1:]))
File "c:\Users\Ryan\repos\mozilla\python\mozbuild\mozbuild\action\file_generate.py", line 72, in main
ret = module.__dict__[method](output, *args.additional_arguments, **kwargs)
File "c:/Users/Ryan/repos/mozilla/build/appini_header.py", line 35, in main
print >>sys.stderr, \
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(<message>, file=<output_stream>)"?
mozmake.EXE[4]: *** [backend.mk;23: .deps/application.ini.h.stub] Error 1
mozmake.EXE[3]: *** [c:/Users/Ryan/repos/mozilla/config/recurse.mk;101: build/export] Error 2
Yes. I have this patch to fix the prints in appini_header.py
diff --git a/build/appini_header.py b/build/appini_header.py
--- a/build/appini_header.py
+++ b/build/appini_header.py
@@ -27,18 +27,18 @@ def main(output, file):
for s in config.sections() for o in config.options(s))
appdata['flags'] = ' | '.join(sorted(flags)) if flags else '0'
appdata['App:profile'] = ('"%s"' % appdata['App:profile']
if 'App:profile' in appdata else 'NULL')
expected = ('App:vendor', 'App:name', 'App:remotingname', 'App:version', 'App:buildid',
'App:id', 'Gecko:minversion', 'Gecko:maxversion', 'AppUpdate:url')
missing = [var for var in expected if var not in appdata]
if missing:
- print >>sys.stderr, \
- "Missing values in %s: %s" % (file, ', '.join(missing))
+ print("Missing values in %s: %s" % (file, ', '.join(missing)),
+ file=sys.stderr)
sys.exit(1)
if 'Crash Reporter:serverurl' not in appdata:
appdata['Crash Reporter:serverurl'] = ''
if 'App:sourcerepository' in appdata and 'App:sourcestamp' in appdata:
appdata['App:sourceurl'] = '"%(App:sourcerepository)s/rev/%(App:sourcestamp)s"' % appdata
else:
@@ -63,9 +63,10 @@ def main(output, file):
"%(AppUpdate:url)s"https://mail.yahoo.com/d/folders/1
};''' % appdata)
if __name__ == '__main__':
if len(sys.argv) != 1:
main(sys.stdout, sys.argv[1])
else:
- print >>sys.stderr, "Usage: %s /path/to/application.ini" % sys.argv[0]
+ print("Usage: %s /path/to/application.ini" % sys.argv[0],
+ file=sys.stderr)
With that installed it is obvious from the build that it fails because of disabling updater.
Print statement fix over in bug 1625466
Can we remove Windows from the summary since this issue is OS independent?
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
I can reproduce this if I disable building the updater. I think that the problem is that I conditionally included the update URL in application.ini, but didn't ifdef out the handling of the URL. It would be quite messy to ifdef out everything that propagates the url through appinfo, so I think instead I'll just unconditionally include the URL in application.ini.
Assignee | ||
Comment 7•4 years ago
|
||
Updated•4 years ago
|
I was wondering if something like this might be better
[AppUpdate]
#if MOZ_UPDATER
URL=https://aus5.mozilla.org/update/6/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml
#else
URL=""
#endif
Assignee | ||
Comment 9•4 years ago
|
||
That seems reasonable. I'll update the patch.
Comment 10•4 years ago
•
|
||
Would you mind choosing a reviewer who is still working right now?
I ask because my (and probably others') local GeckoView build is broken right now without manually applying this patch, and assuming that glandium isn't coming back to work until Monday in Japan, you won't see any response until our Sunday night at the earliest.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Any update? local build is busted for everybody right now :/
Assignee | ||
Comment 13•4 years ago
|
||
I've got a patch up that seems to fix things. Just waiting for code review.
Comment 14•4 years ago
|
||
Please find a reviewer for this.
Comment 15•4 years ago
|
||
Pushed by ksteuber@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/91721122ded4 Fix bug where conditionally including the update URL in application.ini breaks building without the updater r=rstewart
Comment hidden (offtopic) |
Assignee | ||
Comment 17•4 years ago
|
||
It breaks geckoview unconditionally, I assume because it never builds an updater.
Comment 18•4 years ago
|
||
Correct. GV doesn't use the updater. Also this broke lint automation too: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=295662564&repo=try&lineNumber=1043
Comment hidden (offtopic) |
Comment 20•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•