Closed Bug 1185632 Opened 9 years ago Closed 9 years ago

[mozinfo] mozinfo.os is 'unknown' running under MSYS2 on Windows 8.1 x64

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: parkouss)

References

Details

Attachments

(2 files)

(mozregression)[~/src/tmp]$ python -c 'import mozinfo; print mozinfo.os'
UNKNOWN

(mozregression)[~/src/tmp]$ python -c 'import platform; print platform.uname()[0]'
MINGW32_NT-6.3

This is causing bug 1185602 (I'll leave that bug in the mozregression component, since it can be used to handle the "unknown" OS more gracefully).
I should add I'm using the msys2 python package, rather than the win32 standalone python install.

Even if I make adjust the line referenced in comment 1, so that we follow that codepath, I then get:

(mozregression)[~/src/tmp]$ mozregression --good 2015-01-02
Traceback (most recent call last):
  File "/home/Ed/.virtualenvs/mozregression/bin/mozregression", line 7, in <module>
    from mozregression.main import cli
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozregression/main.py", line 11, in <module>
    import mozinfo
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozinfo/__init__.py", line 54, in <module>
    import mozinfo
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozinfo/mozinfo.py", line 47, in <module>
    (major, minor, _, _, service_pack) = os.sys.getwindowsversion()
AttributeError: 'module' object has no attribute 'getwindowsversion'
Editing mozinfo to temporarily hardcode the version/service pack (to work around the exception in comment 2), then gives:

(mozregression)[~/src/tmp]$ mozregression --good 2015-01-02
Traceback (most recent call last):
  File "/home/Ed/.virtualenvs/mozregression/bin/mozregression", line 7, in <module>
    from mozregression.main import cli
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozregression/main.py", line 32, in <module>
    from mozregression.launchers import REGISTRY as APP_REGISTRY
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozregression/launchers.py", line 14, in <module>
    from mozrunner import Runner
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozrunner/__init__.py", line 4, in <module>
    from .cli import *
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozrunner/cli.py", line 11, in <module>
    from .runners import runners
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozrunner/runners.py", line 11, in <module>
    from .base import DeviceRunner, GeckoRuntimeRunner
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozrunner/base/__init__.py", line 1, in <module>

    from .runner import BaseRunner
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozrunner/base/runner.py", line 13, in <module>
    import mozcrash
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozcrash/__init__.py", line 8, in <module>
    from mozcrash import *
  File "/home/Ed/.virtualenvs/mozregression/lib/python2.7/site-packages/mozcrash/mozcrash.py", line 348, in <module>
    kernel32 = ctypes.windll.kernel32
AttributeError: 'module' object has no attribute 'windll'

:-(
(Even though we don't need to use mozcrash)
See Also: → 1190371
Sounds like we don't support MSYS Python very well. We can either state that up front--that we only support native Windows Python, or we can fix things to work under MSYS Python as best as possible. That might mean that some bits of things like mozcrash won't work, but I also wouldn't be surprised to find that various other things don't work, since I'm pretty sure we're only testing with Windows Python.
No longer blocks: 1185602
Ok, so let's fix only the mozinfo.os member for now, so mozregression (and possibly other tools like mozdownload) can work as expected on MSYS.
Assignee: nobody → j.parkouss
Blocks: 1185602
Status: NEW → ASSIGNED
Bug 1185632 - [mozinfo] mozinfo.os is unknown running under MSYS. r=wlach
Attachment #8681371 - Flags: review?(wlachance)
Bug 1185632 - [mozinfo] bump release to 0.9. r=wlach
Attachment #8681372 - Flags: review?(wlachance)
Comment on attachment 8681372 [details]
MozReview Request: Bug 1185632 - [mozinfo] bump release to 0.9. r=wlach

https://reviewboard.mozilla.org/r/23817/#review21281
Attachment #8681372 - Flags: review?(wlachance) → review+
Attachment #8681371 - Flags: review?(wlachance) → review+
Comment on attachment 8681371 [details]
MozReview Request: Bug 1185632 - [mozinfo] mozinfo.os is unknown running under MSYS. r=wlach

https://reviewboard.mozilla.org/r/23815/#review21283
I will release it on pypi once patches are in m-c.
Keywords: leave-open
Done:

Submitting dist/mozinfo-0.9.tar.gz to https://pypi.python.org/pypi
Server response (200): OK
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: